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.
- StripedHorseCopper 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
- V-GEe7Brass ContributorCould you provide more info on how you saved the 3d map and also what you have tried so far?
- Alberto2495Copper ContributorThe 3D map can’t be saved, I dont know how it really works but it gets saved in the excel where you get the datas. I have tried with the command workbook.open. Also tried recording a macro but it doesn’t work when I click to open 3D maps