My solution to this problem:
Sub ExportSelectionToBMP()
Dim vsoSelection As Visio.Selection
Dim vsoPage As Visio.Page
Dim exportPath As String
Dim resolution As Double
exportPath = "C:\Users\USERNAME\Desktop\11.bmp"
resolution = 140
Application.Settings.SetRasterExportResolution visRasterUseCustomResolution, resolution, resolution, visRasterPixelsPerInch
Set vsoWindow = ActiveWindow
Set vsoSelection = ActiveWindow.Selection
If Not vsoSelection Is Nothing Then
vsoSelection.Export (exportPath)
MsgBox "Done.", vbInformation
Else
MsgBox "No selection", vbExclamation
End If
End Sub