+ Reply to Thread
Results 1 to 6 of 6

Using variable in Range in Sub

Hybrid View

  1. #1
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Using variable in Range in Sub

    Your first bit of code should select A1:S1 (or whatever r equals) - are you saying it doesn't? Apart from unnecessary use of Select your use of variables looks fine to me.

  2. #2
    Registered User
    Join Date
    03-03-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    53

    Re: Using variable in Range in Sub

    Quote Originally Posted by StephenR View Post
    Your first bit of code should select A1:S1 (or whatever r equals) - are you saying it doesn't? Apart from unnecessary use of Select your use of variables looks fine to me.
    OK, I'm losing the variable, when r is null then the complete worksheet gets selected for format.

    I'll get it sorted now, thanks, I had been calling the routine from a workbook

+ 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