Results 1 to 6 of 6
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calling a routine (XP02)

    In XL97 I used a private sub with the following line of code: Call Sheet3.Start

    Since I switched to XP the line of code errors out.

    Any suggestions?
    Thanks,
    John

  2. #2
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calling a routine (XP02)

    Neither. The Microsoft Excel Object named Sheet3 contains "Sub Start()". I'm trying to call or run "Sub Start()" from that object. There is a UserForm button that is clicked to call the sub-routine.

    John

  3. #3
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Missouri, USA
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calling a routine (XP02)

    Obviously "Call" is not part of the Object Library.

    Are you trying to Select Sheet3 or Activate? Or is this another macro? If so, you can just use the macro name, and it will run at that point.

  4. #4
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Missouri, USA
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calling a routine (XP02)

    Should be able to use just the name "Start" (without the quotes, although "Start" may be a inadvisable name to use for macro)

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Calling a routine (XP02)

    I can't test on XP ( I still use XL97), but did you try:
    <pre>[Sheet3].start</pre>


    Steve

  6. #6
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calling a routine (XP02)

    Steve,

    Your suggestion worked but XP gave me issues along the way. I had to take the code out of the XL sheet object, paste it into a new module and then cut/paste it back to the XL object.

    Yikes!!
    John

    John

Posting Permissions

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