Workbook.sheets.range.select problems - Page 2
Eliminate Pivot Table Annoyances
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Workbook.sheets.range.select problems

  1. #11
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    do you know how to debug your code , sometimes watching what is going on in debug mode will answer your question , I have a lot of trial and error stuff Debuging makes it.

  2. #12
    Board Regular
    Join Date
    Mar 2002
    Location
    England, UK.
    Posts
    526
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    OK, I have another problem for u with this thing.

    The 'original' workbook I do not know the name of as I am using this:

    filetoOpen = Application.GetOpenFilename("Text Files (*.txt), *.txt")

    thing. This gives me the full path of the file, so won't work like this:

    Workbooks(filetoOpen). ....
    does not work.

    Is there a way of reducing the file path to just get the filename.xls out and then use that in the Workbooka("filename.xls").activate format?

    Thanks

    RET79

  3. #13
    Board Regular
    Join Date
    Mar 2002
    Location
    England, UK.
    Posts
    526
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Sorry, I am answering my own question.

    For that new text file I can just use

    namesheet = activesheet.name & ".txt"

    then can say
    Workbooks(namesheet).activate

    further on.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com