Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Patrick, sorry I couldn't reply earlier - the website was temporarily
unavailable more than it was spasmodically available. Brett "Patrick Molloy" wrote: I suspect that F_LNCH is the sheet object name, not the sheet name. In my code sample 1 below), and yours, this will raise the Variable Not Defined error so rename the object. However, if its the sheet name, then change the code (sample 2) sample 1 Option Explicit Sub x() Q20_DUMPDATA_UF0_QCP ("CHECK.REFI") End Sub Sub Q20_DUMPDATA_UF0_QCP(stage As String) Dim rng As Range Set rng = F_LNCH.Range(stage) End Sub sample 1 Option Explicit Sub x() Q20_DUMPDATA_UF0_QCP ("CHECK.REFI") End Sub Sub Q20_DUMPDATA_UF0_QCP(stage As String) Dim rng As Range Set rng = Worksheets("F_LNCH").Range(stage) End Sub "Brett" wrote in message ... if "CHECK.REFI" is the name of a cell then how do I pass that to a sub please? This doesn't work: Call Q20_DUMPDATA_UF0_QCP("CHECK.REFI") Sub Q20_DUMPDATA_UF0_QCP(stage) Set rng = F_LNCH.Range(stage) ...statements end sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
right syntax | Excel Worksheet Functions | |||
Why so much non-OOP syntax in VBA? | Excel Programming | |||
Need help with If/Then Syntax | Excel Programming | |||
syntax issue | Excel Programming | |||
Names.Add - Range Syntax Issue | Excel Programming |