+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Use a variable instead of a hard coded value

  1. #1
    Registered User
    Join Date
    12-05-2011
    Location
    Cincinnati, OH
    MS-Off Ver
    Excel 2007
    Posts
    40

    Question Use a variable instead of a hard coded value

    Hi folks,

    This should be an easy one.

    Below is a line of code that works fine:

    Please Login or Register  to view this content.
    But instead of the hard coded value 6725, I want to use my variable LastRow (Dim as Integer).

    How should I format the new code? I have tried simple things like:

    Please Login or Register  to view this content.
    And I get '1004' errors.

    Can you folks tell me how to do this right, or if not "right" just so it will work?!

    - Thomas
    Last edited by ThomasHaller; 12-15-2011 at 01:45 PM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Please help me use a variable instead of a hard coded value.

    You were close:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    12-05-2011
    Location
    Cincinnati, OH
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Please help me use a variable instead of a hard coded value.

    Woohoo! Thanks romperstomper! I am even learning from these answers!!

    - Thomas

+ 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