PDA

View Full Version : Solved: Force users to enable macros



rajagopal
10-20-2008, 03:20 AM
Hi,
I was using the code given in the KB entry http://vbaexpress.com/kb/getarticle.php?kb_id=578

I'm getting a Run time error' 1004 - Method 'Goto' of object appreciation failed message.
It seems to be an error in the line

Application.Goto Worksheets(1).[A1], True '< Optional

Can you anyone help.. i've given the error screenshot and also the working file as an attachment..

Bob Phillips
10-20-2008, 03:37 AM
Change that line to



Application.Goto Worksheets(2).[A1], True '< Optional

rajagopal
10-20-2008, 03:54 AM
This works fine now.
can you explain me what this code meant for?

Bob Phillips
10-20-2008, 03:57 AM
The idea is to invoke the first visible sheet if macros are enabled, but for you the first visible sheet is sheet 2 not sheet 1.

rajagopal
10-20-2008, 03:59 AM
Thank you so much.