Forum Discussion
Alberto2495
Aug 02, 2022Copper Contributor
Macro to open automatically a 3D map
Hello everyone, I’m looking for a code that opens automatically, when I open the excel, the 3D map I have saved on it. I have tried everything and it always fail. Thank you.
StripedHorse
Mar 14, 2025Copper Contributor
I use this macro to open 3D maps in Excel from a button on a worksheet (checks the version then mimics pressing ALT and using the keyboard):
Sub Launch3DMap()
' # Uses SendKeys method to open 3D Maps in Excel #
' # Suggestion: Create a button on the <Developer> #
' # tab and assign this macro to it #
' # Tim Austin - 3/14/2025 #
Dim strVersion As String
strVersion = Application.Version
strVersion = Left(strVersion, InStr(strVersion, ".") - 1)
MsgBox "Remember to Click on <Refresh Data> in the 3D Map"
If 1 * strVersion < 16 Then
SendKeys "%nsmo~"
SendKeys "%"
SendKeys "N"
SendKeys "SM"
SendKeys "O"
Else
SendKeys "%adm3o~"
SendKeys "%"
SendKeys "A"
SendKeys "DM"
SendKeys "3"
SendKeys "O"
End If
End Sub
shahrozmalik0011
May 08, 2025Copper Contributor
Thank you for this brilliant answer, I wanted to do this exactly in my excel workbook. I have tried this and working perfectly