Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
AutoRun Macro with a delay to give user the choice to cancel the macro | Excel Programming | |||
Need syntax for RUNning a Word macro with an argument, called from an Excel macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |