Consulting

Results 1 to 3 of 3

Thread: Variable names to refer to column and row

  1. #1
    VBAX Regular
    Joined
    Aug 2006
    Posts
    82
    Location

    Variable names to refer to column and row

    I have two variables called "ro" and "col". Each is found by searching for two dates on a spreadsheet -- one across the top and the other down the left -- then returning the column and row references. Now I want to go to cell [col][ro]. I know this can't be as hard as I'm making it, but I can't do it without constantly getting a run-time error. How do I fill in the blank using my variable names?

    range( ? ).Select

  2. #2
    VBAX Regular
    Joined
    Aug 2006
    Posts
    82
    Location
    Got it. I changed "range" to "cells" and voila! I knew it was simple!

  3. #3
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Thanks for posting your solution. You can mark your own thread solved by using thread tools at the top of the page.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

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