PDA

Click to See Complete Forum and Search --> : Easy, hopefully, VBA for Excel question ...


AdamBrunt
Mar 14th, 2005, 07:36 AM
Hi all,

I am trying to debug/fix someone else's VBA for Excel code.

When the workbook opens, the following code is run:


Private Sub Workbook_Open()
MsgBox "Please save into your shared drive and complete all white boxes on the 'Input'and Location Split sheets.", vbCritical, "IMPORTANT"
Range("Start").Select
End Sub


This is going to sound obvious, and I'm sure I am going to kick myself when I find out, but what does the Range("Start").Select line do ? And why would it be generating an error ?

Regards,

Adam Brunt

Monarchs
Mar 14th, 2005, 07:45 AM
It doesn't work because there is no range named "start" in your excel Workbook. Define one or change start for an existing range (ie: A1)

To define a range: select a few cells, click on insert, name, define

AdamBrunt
Mar 14th, 2005, 07:55 AM
It doesn't work because there is no range named "start" in your excel Workbook. Define one or change start for an existing range (ie: A1)

To define a range: select a few cells, click on insert, name, define

Thanks for the help monarchs.

Odd thing is ... the spreadsheet is meant to be opened in IE from a link on our intranet website. If it is opened this way then I don't get any errors.

However, if I open it from Explorer or after I haved saved the intranet version to my local drive I get a:


Run time error 1004:

Select method of Range class failed


error message ??

Also, if I have a few cells selected the Insert -> Name -> Define menu is greyed out ?? Only the Paste menu option is available ??