Pat_The_Bat
Board Regular
- Joined
- Jul 12, 2018
- Messages
- 83
When I am on the Sheet "Master", and I step through this code there is no problem. But if I'm on one of the other sheets in the wkbk and I start stepping through the code, I get Run-Time error '1004':
Application-defined or object-defined error
I'm guessing it has to do with the way I've set the range = to the value of the cell B3.
Any help is appreciated!
Application-defined or object-defined error
I'm guessing it has to do with the way I've set the range = to the value of the cell B3.
Any help is appreciated!
HTML:
Dim Bor1 As StringDim Bor2 As StringDim Bor3 As StringDim Bor4 As String
Dim Wage1 As RangeDim Wage2 As RangeDim Wage3 As RangeDim Wage4 As RangeDim Self As RangeDim Fixed1 As RangeDim Fixed2 As RangeDim Fixed3 As Range
Dim LstRow1 As IntegerDim LstRow2 As IntegerDim LstRow3 As IntegerDim LstRow4 As Integer
Worksheets("Master").Range("D2:D100").ClearContents With Worksheets("Master") Set Wage1 = Sheets("Master").Range(Range("B3").Value) Wage1.Select Set Self = Sheets("Master").Range(Range("B7").Value) Wage1.Select Set Fixed1 = Sheets("Master").Range(Range("B8").Value) Wage1.Select Set Fixed2 = Sheets("Master").Range(Range("B9").Value) Wage1.Select Set Fixed3 = Sheets("Master").Range(Range("B10").Value) Wage1.Select End With