Results 1 to 3 of 3

Thread: Easy, hopefully, VBA for Excel question ...

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    28

    Easy, hopefully, VBA for Excel question ...

    Hi all,

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

    When the workbook opens, the following code is run:

    PHP Code:
    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

  2. #2
    New Member
    Join Date
    Mar 2005
    Posts
    9

    Re: Easy, hopefully, VBA for Excel question ...

    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

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    28

    Re: Easy, hopefully, VBA for Excel question ...

    Quote Originally Posted by Monarchs
    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 ??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width