Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable
Hi guys,Thanks for answering my question. Really great help! Well, I have another problem. I need to define a range but the row number has to be a variable. Supposed ws is defined as a worksheet and rw an integer variable. Here is the code: ws.Range("A3:A" & rw & "'").Name = "range_name" I got run-time error. Method 'Range of object'_worksheet failed What did I do wrong? Thanks, again. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable
try
ws.Range("A3:A" & rw & "'").Name = "range_name" rw=4 ws.Range("A3:A" & rw).Name = "range_name" -- Don Guillett SalesAid Software "Candy" wrote in message ... Hi guys,Thanks for answering my question. Really great help! Well, I have another problem. I need to define a range but the row number has to be a variable. Supposed ws is defined as a worksheet and rw an integer variable. Here is the code: ws.Range("A3:A" & rw & "'").Name = "range_name" I got run-time error. Method 'Range of object'_worksheet failed What did I do wrong? Thanks, again. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Runtime Error '91' Object variable or With block variable not set | Excel Discussion (Misc queries) | |||
How to graph x-variable versus y-variable in Excel ? | New Users to Excel | |||
variable height variable width stacked bar charts | Charts and Charting in Excel | |||
Sum cells based on a row variable and seperate column variable | Excel Worksheet Functions | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions |