+ Reply to Thread
Results 1 to 38 of 38

Routine no longer working in Excel Module?

Hybrid View

meridian2000 Routine no longer working in... 06-17-2009, 06:59 AM
romperstomper Re: Routine no longer working... 06-17-2009, 07:23 AM
meridian2000 Re: Routine no longer working... 06-17-2009, 07:28 AM
romperstomper Re: Routine no longer working... 06-17-2009, 07:30 AM
meridian2000 Re: Routine no longer working... 06-17-2009, 07:33 AM
romperstomper Re: Routine no longer working... 06-17-2009, 07:38 AM
romperstomper Re: Routine no longer working... 06-17-2009, 08:10 AM
  1. #1
    Registered User
    Join Date
    06-17-2009
    Location
    Morden,England
    MS-Off Ver
    Excel 2003
    Posts
    23

    Routine no longer working in Excel Module?

    Hi everyone, I'm a relative newbie to VBA within Office Apps, A work collegue and I wrote a program in VB6 that enabled us to use "right Click" context menus in Excel 2003, basically when you clicked on one of the menus it ran a Sub which was held in a sheet called personal.xls which is in the XLSTART folder on the pc. For some reason it's now not working at all on my pc although it's working on several other pc's, I've opened up the sheet I'm working on in the Visual Basic Editor and the the personal.xls sheet is there along with my other workbook, I've put a breakpoint on the sub in question, gone back to the orginal sheet and fired up the context menu expecting to find the cursor stuck on the break point, but nothing happens. It's as if the personal.xls isn't part of the sheet, I hope I've explained this correctly. Can someone advise me as to what may be wrong?

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,967

    Re: Routine no longer working in Excel Module?

    In the VBEditor, open the Immediate window (Ctrl+G) and type:
    Application.EnableEvents = True
    and press enter. then try the code again and see if it works.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    06-17-2009
    Location
    Morden,England
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Routine no longer working in Excel Module?

    thanks for the reply romperstomper, just tried your suggestion but alas it doesn't work still

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,967

    Re: Routine no longer working in Excel Module?

    Have you tried restarting Excel? I'm guessing you are using an application level event sink? If so, it may be that the variable has been reset.

  5. #5
    Registered User
    Join Date
    06-17-2009
    Location
    Morden,England
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Routine no longer working in Excel Module?

    Hi, yes I've tried restarting Excel, this problem has been going for weeks, the whole pc has been restarted many times, I've 2 pc's on my desk, both with the same software, one works the other doesn't. It's as if Excel dosn't know the personal.xls sheet is there

  6. #6
    Registered User
    Join Date
    06-17-2009
    Location
    Morden,England
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Routine no longer working in Excel Module?

    I've just noticed one thing a bit strange, if I just open up the file I'm using by double clicking it on the first pc, then open up Visual Basic Editor, I see the file personal.xls in the list, if I open it on the other pc (same file) and look in the visual basic editor, it isn't in the list, is this of any help?

  7. #7
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,967

    Re: Routine no longer working in Excel Module?

    Are you using Application.Run in the VB6 code to run the macro? If so, did you specify a path to the Personal.xls workbook in the code or just the macro name? (I'm assuming that other macros work OK?)

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,967

    Re: Routine no longer working in Excel Module?

    If you just start Excel normally on that second PC, is Personal.xls loaded?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1