How to run this macro
LOL... I was concentrating so hard on the c1/c2 problem that I completely
overlooked the rest of the code's problems. Thanks for catching that.
--
Rick (MVP - Excel)
"Sam" wrote in message
...
On May 27, 2:32 pm, "Rick Rothstein"
wrote:
What are c1 and c2... cell addresses? If so, try this...
ORG = Range("C1").Value
DES = Range("C2").Value
--
Rick (MVP - Excel)
"Paul Lambson" wrote in message
...
I am trying to run this macro to take the value in cells C1 & C2 and
write them in the cells below. When I run this macro nothing happens.
What am i missing?
Sub LegUpdate()
'
Dim ORG As String
Dim DES As String
ORG = c1
DES = c2
B5 = ORG
H5 = ORG
N5 = ORG
B29 = ORG
H29 = ORG
N29 = ORG
B6 = DES
H6 = DES
N6 = DES
B28 = DES
H28 = DES
N26 = DES
'
'
End Sub- Hide quoted text -
- Show quoted text -
Rick has the right idea (i.e. DES = Range("C2").Value ). I would just
add that to set the value you must use Range or Cells.
Range("B5") = ORG
also if you want to reference a specific sheet you can do that as
well.
Sheets("sheet_name").Range("B5") = ORG
Good luck,
Sam
|