PDA

View Full Version : '1004 Error' Message



BexleyManor
12-13-2005, 03:52 AM
A collegue has passed this workbook over to me to have a look at as it keeps firing an 1004 error message. The Macro has been created with the recorder so the code doesn't appear that efficient yet I can't work out why the error happens ??

Can any of you super coders out there please help as it's driving me mad!! :banghead:

Also, If any of you have suggestions for a better way of coding this then I would be sooo grateful. :bow:

Thanks folks.

ilyaskazi
12-13-2005, 04:16 AM
Just try this single line code:
Sub MacroTest()

ActiveWorkbook.CustomViews("wk" & Sheets("Sheet1").Range("Week")).Show
End Sub

Assign your command button macro to MacroTest and check...

HTH
ilyaskazi

BexleyManor
12-13-2005, 04:48 AM
WOW!! Now thats what I call efficient coding.

Thank you so much my friend, you've saved me from going mad !!