+ Reply to Thread
Results 1 to 2 of 2

Strange bug/issue opening a workbook

  1. #1
    Registered User
    Join Date
    11-25-2007
    Posts
    46

    Strange bug/issue opening a workbook

    I have a macro that works if I open the file using GetOpenFilename and select the file from the open dialog box (the macro copies the last row of data in the open worksheet and copies to the launch worksheet). But the macro stops just after opening the other workbook if I hard code the file name or read the filename from a cell. I wonder if anyone can help. No error message.

    Code below is the working version, I am able open the file called filetoOpen. Just below this code is the commented out code to read the same filename from a cell in the worksheet, or commented out direct text loading of filetoOpen. I have confirmed through message boxes that I am reading in or hard coding the name correctly, and the file does indeed open. Again the macro appears to have finished or stopped, does not execute any steps below the file open step if I read the name or hard code the name (the "test" message is never delivered).

    In the end I want to read the file name to open from the worksheet I am in from the cell. I have tried several methods of opening the file (they are commented out in the code) and they all work with the GetOpenFilename code and none work with reading the file or hard coding. The file indeed is a tab delimited text file which I name as .xls name.

    I would appreciate any help.

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    11-25-2007
    Posts
    46

    I found the cause - macro issue/bug

    Elsewhere in the forum I found a clue...

    I was using the keyboard short cut CNTRL-Shift-T

    The other poster had found a similar freeze/stop of the macro when the keyboard short cut used CNTRL-Shift-, but work if you just used CNTRL-

    I changed my keyboard short cut to not use the Shift and it also works now.

+ 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