+ Reply to Thread
Results 1 to 3 of 3

Defining a Range Value with a Variable

  1. #1
    Registered User
    Join Date
    07-19-2010
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    20

    Lightbulb Defining a Range Value with a Variable

    hey folks

    i've run across a little challenge today, maybe you could help me out?

    the problem is rather simple, i guess:
    i have a script which puts values of file 1, cell A into File 2 cell A:
    i don't think it is necessary to show the whole code, but the important line is this one
    Please Login or Register  to view this content.
    what i want is simply to make it a little bit more user friendly and define A2 in the excel file where i run the macro.
    For example, I would like to put the value "A2" into the cell B1. The code should then grab the value of B1 and put it into ws.Range("HERE").

    i've tried simple things like

    myCell = Range ("B1")

    and then ws.myCell = Range("A20") but this didnt work out.

    any tips help advices would be very much appreciated
    Last edited by elgourmet; 08-03-2010 at 03:13 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Defining a Range Value with a Variable

    If I've understood

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-19-2010
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Defining a Range Value with a Variable

    thanks
    i should have dropped the ""

+ 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