I have a server list in Excel. In column A, I have the name of the server. The document contains all kinds of info regarding the servers, but that isn't important for my current issue.
Prior to SP1, I had three buttons that linked to macros. The buttons were called "RDP", "DW" and "Mng". The buttons sit in rows 2 & 3 in column A. The worksheet cells were frozen at B4, so that the column headers in row 3 would stay-put, and the server name and macro buttons would also always be visible. With SP1, for some reason, the buttons auto resize to just a few pixels wide. Even if I resize the buttons, they snap back to their prior state in no time at-all. This is a shared workbook in Excel 2010. The problem makes the macro buttons worthless.
I attached two snippets to demonstrate the macro button problem.
So, I need to work-around the problem. I've added three columns to the spreadsheet at B, C and D. Each with the headers named the same as the buttons. I'm struggling to find a workable solution that when I click in one of those cells, it will launch the appropriate application with the appropriate parameters. I could re-use my macros, but I can't seem to figure-out how to call the macro from the cell and reference the server name in column A. Any advice would be greatly appreciated. I'm not an Excel guru, so please describe how you might solve the problem in detail. Here are my three macros:
![]()
Sub DameWare() If Environ("Processor_architecture") = "x86" Then swindir = Environ("ProgramFiles") Else swindir = Environ("ProgramFiles(x86)") End If Shell swindir & "\DameWa~1\DameWa~1\dwrcc.exe -c: -h: -m:" & ActiveCell & " -a:1" End Sub Sub RDPConsole() swindir = Environ("windir") Shell swindir & "\system32\mstsc.exe /v:" & ActiveCell & " /w:1024 /h:768 /admin" End Sub Sub Manage() swindir = Environ("windir") startdoc = ShellExecute(Form_FrmMachines.Hwnd, "Open", swindir & "\system32\compmgmt.msc", "/computer=\\" & ActiveCell, 0&, 1) End Sub
Bookmarks