RainbowGurl44
New Member
- Joined
- May 29, 2013
- Messages
- 3
Hi, all!
I'm a total newbie at VBA, and I'm trying to get this code to use some pre-defined variables to accurately define a range of cells within a column. This range is going to keep changing... there's a loop.
If the code looks messy, that's probably due to my efforts to split everything up in the hopes of isolating the problem.
The preceding variable declarations are:
The error code I've been getting is: Run-time error '13': Type mismatch. I've been trying putting things in quotes, and out of quotes, using '0' instead of 'False'... And I'm still feeling really stuck!
Thanks, everyone!
I'm a total newbie at VBA, and I'm trying to get this code to use some pre-defined variables to accurately define a range of cells within a column. This range is going to keep changing... there's a loop.
If the code looks messy, that's probably due to my efforts to split everything up in the hopes of isolating the problem.
Code:
For Each ATA In MyRange
Set NextATA = ATA.Offset(1, 0)
'Has it go through each ATA in the list, one at a time, creating a workbook for each one.
'STILL NEED TO FIX THIS PART BELOW.
Set RepairListRange = Workbooks("Estimate Sheet Template.xlsx").Worksheets("STICK CONVERTED PDF HERE").Range("D1:D3000")
Set RepairListFirst = Application.Match(ATA.Value), Range("RepairListRange"), False)
RepairListFirst = RepairListFirst + 1
Set RepairListLast = Application.Match(NextATA.Value, Range("RepairListRange"), False)
RepairListLast = RepairListLast - 1
Set RepairList = "D" + RepairlistFirstRow + ":D" + RepairListLast
The preceding variable declarations are:
Code:
Public ATA As Range, MyRange As Range
Public NextATA As Range
Public RepairList As Range
Public RepairListFirst As Variant
Public RepairListLast As Variant
Public RepairListRange As Range
Public Repair As Range
The error code I've been getting is: Run-time error '13': Type mismatch. I've been trying putting things in quotes, and out of quotes, using '0' instead of 'False'... And I'm still feeling really stuck!
Thanks, everyone!