ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copy text from a cell to enter in macro (https://www.excelbanter.com/excel-programming/429610-re-copy-text-cell-enter-macro.html)

Patrick Molloy

copy text from a cell to enter in macro
 
DIM cell as Range
set cell = range(Range("D4").Value)

cell is now referencing A4 if A4 was the value in D4
if A4 had "Hello World" (sorry)
then
MSGBOX cell.Value
would show this

"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?



All times are GMT +1. The time now is 05:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com