This is really odd, so hopefully someone can explain why (and how to fix it).
I've created a macro that is run from an XLS of data. It presents a "file open..." dialog to enable the user to load up a Master Report file, then moves the XLS data into the Master report, does stuff to it and saves it onto the desktop as a new file.
This all works fine when launching the macro from VB, or using Alt-F8 and selecting it. But if I launch the macro using a keyboard shortcut (Ctrl+Shift+E) then it runs up to the point where it opens the selected Master Report, and then it just stops! No error, no obvious blip, but it does nothing after opening that file.
... other stuff above here...
Dim sReport, sReportSheetname, sPCMaster As String
' get the names of the open PC data set and the worksheet with the data on it
sReport = ActiveWorkbook.Name
sReportSheetname = ActiveSheet.Name
' allow the user to go and find the Post Campaign Report master template
strFilename = Application.GetOpenFilename("All files (*.*), *.*")
If strFilename = False Then Exit Sub ' to exit if Cancel button pressed
Workbooks.Open (strFilename) ' Opening workbook indicated by passed name
' *** this (and beyond) does not run if the macro was launched using Ctrl + Shift + E keyboard shortcut***
' the newly opened file is now active - store its name
sPCMaster = ActiveWorkbook.Name
... other stuff below here...
Huh? 
I'm more stumped than an multiple-amputee stump-tailed macaque at a cricket match - anyone got any idea as to what on earth is going on here, and how I can make it launch from the shortcut?
Thanks in advance
Steve
Bookmarks