Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
singel cell reference
hi all,
how do i make a reference to a single specific cell (for example D1) in a amcro thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
singel cell reference
Hi Guye,
'------------------- how do i make a reference to a single specific cell (for example D1) in a amcro '------------------- I suspect that there may be more to your question than is immediately apparent, but try something like: '============= Public Sub Tester() Dim rng As Range Set rng = Range("D1") MsgBox rng.Address(0, 0) End Sub '<<============= --- Regards, Norman |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
singel cell reference
The default property for the range object is Value, so in most cases,
you can use Range("D1") directly a = Range("D1") * 10 As you get deeper into VBA, you may hit cases where Range("D1").Value is specifically needed. Carl. On Apr 16, 4:20 am, "Norman Jones" wrote: Hi Guye, '------------------- how do i make a reference to a single specific cell (for example D1) in a amcro '------------------- I suspect that there may be more to your question than is immediately apparent, but try something like: '============= Public Sub Tester() Dim rng As Range Set rng = Range("D1") MsgBox rng.Address(0, 0) End Sub '<<============= --- Regards, Norman |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
singel cell reference
Hi Carl,
'--------------- The default property for the range object is Value, so in most cases, you can use Range("D1") directly a = Range("D1") * 10 As you get deeper into VBA, you may hit cases where Range("D1").Value is specifically needed. '--------------- I assume that your response was intended for Guye. However, I would strongly advocate the required property be stated explicitly, rather than relying on a default value. --- Regards, Norman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
insert a paragraph break within text in a singel cell? | Excel Discussion (Misc queries) | |||
Combined cells to a singel cell | Excel Worksheet Functions | |||
can you have 2 different colors in a singel cell? | Excel Discussion (Misc queries) | |||
matching 2 values with a singel value | Excel Programming | |||
Mail a singel sheet i an xls file. | Excel Discussion (Misc queries) |