A
Al
I keep getting Runtime error 9 - Subscript out of range
when my code hits the line:
rngCopy = Sheets("CTab").Range("CRange") in the code
below. The next line of code may generate the same error
because it contains similar syntax... it just hasn't made
it that far.
(I am populating variables with the worksheet and range
from one worksheet to copy the values held within that
range to a cell on another worksheet when the user clicks
on a command button. All is working fine except for the
persistent error message.) Using Excel 2000.
Dim rngCopy As Range
Dim rngPaste As Range
Dim CTab As Variant
Dim CRange As Variant
Dim PTab As Variant
Dim PRange As Variant
CTab = Sheets("Logic Questions").Range("A53").Value
CRange = Sheets("Logic Questions").Range("H53").Value
PTab = Sheets("Logic Questions").Range("A54").Value
PRange = Sheets("Logic Questions").Range("H54").Value
rngCopy = Sheets(CTab).Range(CRange)
rngPaste = Sheets(PTab).Range(PRange)
rngCopy.Copy
Sheets("Bill").Activate
Thank you in advance for any help you can provide,
Al
when my code hits the line:
rngCopy = Sheets("CTab").Range("CRange") in the code
below. The next line of code may generate the same error
because it contains similar syntax... it just hasn't made
it that far.
(I am populating variables with the worksheet and range
from one worksheet to copy the values held within that
range to a cell on another worksheet when the user clicks
on a command button. All is working fine except for the
persistent error message.) Using Excel 2000.
Dim rngCopy As Range
Dim rngPaste As Range
Dim CTab As Variant
Dim CRange As Variant
Dim PTab As Variant
Dim PRange As Variant
CTab = Sheets("Logic Questions").Range("A53").Value
CRange = Sheets("Logic Questions").Range("H53").Value
PTab = Sheets("Logic Questions").Range("A54").Value
PRange = Sheets("Logic Questions").Range("H54").Value
rngCopy = Sheets(CTab).Range(CRange)
rngPaste = Sheets(PTab).Range(PRange)
rngCopy.Copy
Sheets("Bill").Activate
Thank you in advance for any help you can provide,
Al