View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
pls123 pls123 is offline
external usenet poster
 
Posts: 121
Default fill a cell with this..

it doesn't work.
...but the = is shure correct :)

"John Bundy" wrote:

try this
aWS.Range("A22") = ]Sheet1'!$B$" &
aWS.Range("A20").Value
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"pls123" wrote:

hi all i have to fill cell A20 with ]Sheet1'!$B$999
where 999 is the value of cell A20.
if u can describe the right syntax, that will help me a lot !! ty


Sub A22()
Dim aWB As Workbook
Dim aWS As Worksheet
Set aWB = ThisWorkbook
Set aWS = aWB.Worksheets("Sheet1")

aWS.Range("A22") = ]Sheet1'!$B$" &
aWS.Range("A20").Value
End Sub