When using the keyboard shortcut or going to Tools|Macros the following script does not work. When in the VBA editor, the macro runs properly. Any ideas on this? I shortened some of the filenames/locations to make things easier.
I'm activating the macro with Shift+Ctrl+F, and that is the only time it does not work.
Going to Tools | Macros and highlighting 'Filming' and then selecting Run works flawlessly. I made your suggested changes and it still does not function correctly using the keyboard shortcut.
"Shift+Ctrl+F" is the default combination to set focus on the Font Tool control. I'm not sure if setting a defined shortcut for your macro takes precedence over a default setting??? It would be easy to test just try setting a different shortcut combination. Check it before setting to make sure it's not a default first. Check Excel Help 'F1' for Keyboard Shortcuts to see a list.
Just as a note, it is more efficient for Excel not to "select"; and you can combine some of the lines. Here is an abbreviated improvement
Workbooks.Open Filename:="...Medco Filming.xls"
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
' Combine the two Autofit into one
Columns("C:C").ColumnWidth = 36
old, slow, and confused
but at least I'm inconsistent!