View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
TEAM TEAM is offline
external usenet poster
 
Posts: 1
Default Variable with no Value inside Macro Equation??


I am trying to setup a code that dumps data from one sheet to another.
The user inputs the row number of the data, then the data in that row
is tranferred. How do I get VB/Excel to recognize the value of my
variable in the equations?? My code below is not working.


Code:
--------------------
Sub TransferInfo()

RNum = InputBox("Enter the row number of the new unit")
StationName = "='Master List (Base)'! & RNum & 'E'"

Sheets("DataInput").Select
Range("C5").Select
ActiveCell.FormulaR1C1 = "='Master List (Base)'! & StationName"
--------------------



Thanks.


--
TEAM
------------------------------------------------------------------------
TEAM's Profile: http://www.excelforum.com/member.php...o&userid=22810
View this thread: http://www.excelforum.com/showthread...hreadid=375720