Results 1 to 4 of 4

Thread: Excel: set a range by its name [SELF-RESOLVED]

Threaded View

  1. #1

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Excel: set a range by its name [SELF-RESOLVED]

    I have this VBA code in a Excel spreadsheet:
    VB Code:
    1. Dim vTarget As range
    2. Private Sub Workbook_Open()
    3.     Set vTarget = Range("Sheet1!$B$3")
    4. End Sub
    Now, cell $B$3 has been assigned the name "Volume". I want to set the vTarget variable using the name "Volume" rather than the cell address. I've tried different syntax but always get some kind of error.
    Last edited by krtxmrtz; Jul 3rd, 2006 at 06:50 AM.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

Posting Permissions

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



Click Here to Expand Forum to Full Width