Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
having not found an adequate solution to
http://www.OfficeKB.com/Uwe/Threads/...GP05.phx .gbl i am now asking if i can take the text/values from a cell and use them in the macro? for example i have in cell D4 the text/value "A4" can a macro take the text from this cell? i plan to make the cell A4 an activecell, for reasons i wont go into now i cant simply range("a4").select and apply the macro from there, is this possible? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If D1 contains A4 and you want the contents of A4, just nest the Range
property calls... With Worksheets("Sheet2") MsgBox .Range(.Range("D4").Value).Value End With Note that you do not have to select either D4 or A4 (the cell it is referencing) in order to do what you want. If, however, you wanted to ultimately select A4 (the value in D4), you would just change the last Value property call to a Select method call instead... With Worksheets("Sheet2") .Range(.Range("A1").Value).Select End With -- Rick (MVP - Excel) "Peterzh193" <u52491@uwe wrote in message news:9765201eb2634@uwe... having not found an adequate solution to http://www.OfficeKB.com/Uwe/Threads/...GP05.phx .gbl i am now asking if i can take the text/values from a cell and use them in the macro? for example i have in cell D4 the text/value "A4" can a macro take the text from this cell? i plan to make the cell A4 an activecell, for reasons i wont go into now i cant simply range("a4").select and apply the macro from there, is this possible? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to search a text in a cell and copy the row to another set of cell | Excel Programming | |||
copy text from a cell to enter in macro | Excel Programming | |||
Enter date in text box - copy to worksheet cell | Excel Programming | |||
Use Macro to copy part of text in cell | Excel Programming | |||
Macro to copy text upon entry into cell | Excel Programming |