Consulting

Results 1 to 7 of 7

Thread: Solved: Using Mid Question

  1. #1
    VBAX Expert
    Joined
    Jan 2005
    Posts
    574
    Location

    Solved: Using Mid Question

    All

    I am trying to use the code below to select a worksheet as follows

    My Worksheet is named B and My String called Choice is "=B*"

    I was trying the code below

    [VBA] Worksheets(Mid(Choice, 1, 2)).Cells.ClearContents

    rng.SpecialCells(xlCellTypeVisible).EntireRow.Copy _
    Worksheets(Mid(Choice, 1, 2)).Range("A1")[/VBA]

    Can anyone tell me my error please

    Thanks

    Gibbo

  2. #2
    VBAX Expert
    Joined
    Jan 2005
    Posts
    574
    Location
    Ok Silly mistake, works if i get my arguments the right way round Mid(Choice,2,1)

  3. #3
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    Is this solved? If so please mark it as such. Thanks
    Peace of mind is found in some of the strangest places.

  4. #4
    Administrator
    2nd VP-Knowledge Base
    VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    Hey austenr, did you get that memo on those TPS reports?




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

  5. #5
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    That movie is great!! So much of it is really true in a lot of organizations. Except for the part where Melvin burns down the place. I like the part where they program the virus and screw up the decimal points..
    Peace of mind is found in some of the strangest places.

  6. #6
    Administrator
    2nd VP-Knowledge Base VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    Quote Originally Posted by austenr
    That movie is great!! So much of it is really true in a lot of organizations.
    I know!! I practically live that movie since I came to my new job. Actually, one of the first weeks of working at my job somebody mentioned the "Mondays"... ....I almost laughed in their face when they said that hahaha




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

  7. #7
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    I LOVE THAT MOVIE!!! GOT IT ON DVD!

    "Yeah .. and if you can have those TPS reports for me by the end of the day, that'd be great."

    "Um ya. I'm gonna ask you to go ahead and come in on Saturday."

    "Looks like somebody has a case of the Mondays!"

Posting Permissions

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