TheCobbler
New Member
- Joined
- Aug 21, 2021
- Messages
- 49
- Office Version
- 365
- Platform
- Windows
Hi - Getting the above error when I try to use CORfname that I have as a global variable from a different module which captures a path. (Public CORfname As Variant)
Can see that CORfname in this module is finding the right path in the immediate window so not sure what the issue is. Any ideas? Cheers, Cobb
Workbooks(CORfname).Activate: This line highlights when debugging.
Can see that CORfname in this module is finding the right path in the immediate window so not sure what the issue is. Any ideas? Cheers, Cobb
Workbooks(CORfname).Activate: This line highlights when debugging.
VBA Code:
Option Explicit
Sub L_Shop_Check()
Workbooks(CORfname).Activate
Sheets("To Order").Activate
'Deletes Blank Rows
On Error Resume Next
Columns("B").SpecialCells(xlBlanks).EntireRow.Delete
Dim SkuRng As Range
Dim SkuCell As Range
'Inserts Sku Preface
Range("B1").EntireColumn.Insert
Set SkuRng = Range("C2:C" & Cells(Rows.Count, "C").End(xlUp).Row)
For Each SkuCell In SkuRng
If Not IsEmpty(SkuCell) Then
SkuCell.Offset(, -1) = "_" & SkuCell
End If
Next
Cells(1, 2) = "Merged SKU"
End Sub