![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 76
|
Hi,
I have a dynamic named range in excel named sourcedata ( created using insert->name->define). I want to use it in VBA, i tried range("sourcedata").value , I am having problems, what is the syntax for using it in VBA Karraj. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
Make sure you are spelling it right, but it looks like the right syntax to me. What problems are you having?
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Try:
Put in whatever sheet you're using and the name you used for the range. That should work. |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Posts: 76
|
Thanks for the replies,
With the sheet name it is working well. In the spreadsheet, I am not able to view the dynamic ranges names in the dropdown menu in the toolbars, is there a way I can make it visible? |
|
|
|
|
|
#5 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
You can't see the name in the drop-down to the left of the formula bar? Odd.
Also, you can use the name of the range itself to identify the sheet, e.g., Code:
Sheets(Range("test").Worksheet.Name).Range("test").Value
|
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Posts: 76
|
I am not able to see ONLY the dynamic named ranges. The other named ranges can be seen in the drop down menu to the left of formula bar!
Am I missing something? Karraj |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|