S
Stuart
For fCtr = LBound(PrintFiles) To UBound(PrintFiles)
Set PrintFiles(fCtr) = Workbooks.Open _
(FileName:=PrintFileNames(fCtr))
Range("A1").Select
'If it's the first workbook in the loop, and if the user wants to
'hide the same Column(s):
If fCtr = 1 Then
If Global_HideSameCols = True Then
'On Error Resume Next
* Set Global_ExclColRng = Application.InputBox("Use the left mouse " & _
"button with the Control key," & vbNewLine & "to select at least"
_
& " one cell in each column " & vbNewLine & "(or the entire" _
& ".column), to indicate those" & vbNewLine & "Columns to be" _
& " hidden. Click OK. when done", Type:=8)
'On Error GoTo 0
End If
End If
'But user might still want to hide a Column(s) in individual workbooks,
so:
If HideCols = True Then
If Global_HideSameCols = False Then
'On Error Resume Next
* Set Wkbk_ExclColRng = Application.InputBox("This is a test",
Type:=8)
If I direct the code through the first Set statement and select a range
to hide, then the code executes ok. If I direct it through the second Set
statement, I get an 'Object required' message.
Why is the code not working, and why is it inconsistent, please?
Regards.
Set PrintFiles(fCtr) = Workbooks.Open _
(FileName:=PrintFileNames(fCtr))
Range("A1").Select
'If it's the first workbook in the loop, and if the user wants to
'hide the same Column(s):
If fCtr = 1 Then
If Global_HideSameCols = True Then
'On Error Resume Next
* Set Global_ExclColRng = Application.InputBox("Use the left mouse " & _
"button with the Control key," & vbNewLine & "to select at least"
_
& " one cell in each column " & vbNewLine & "(or the entire" _
& ".column), to indicate those" & vbNewLine & "Columns to be" _
& " hidden. Click OK. when done", Type:=8)
'On Error GoTo 0
End If
End If
'But user might still want to hide a Column(s) in individual workbooks,
so:
If HideCols = True Then
If Global_HideSameCols = False Then
'On Error Resume Next
* Set Wkbk_ExclColRng = Application.InputBox("This is a test",
Type:=8)
If I direct the code through the first Set statement and select a range
to hide, then the code executes ok. If I direct it through the second Set
statement, I get an 'Object required' message.
Why is the code not working, and why is it inconsistent, please?
Regards.