Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Syntax Error ?. Execution does not enter the Select Case
I missed something here, because all Worksheets get printed, ignoring
my Select Case. Help appreciated Sub SummaryPrint() Dim A As String Dim Sh As Worksheet ' Path to Projects Workbook Workbooks.Open Filename:="C:\Report December 2007.xls" Application.ActivePrinter = "LANIER LD160c PCL 6Floor4 on Ne01:" For Each Sh In ActiveWorkbook.Sheets ' Each Worksheet tab is named like 52401, 61021, 61191 Etc... Sh.Activate A = Sh.Name ' Execution does not enter the Select Case, Why ? Select Case A Case "52401" MsgBox "Printing", A Case "61021" MsgBox "Printing", A Case Else GoTo NoPrint End Select Range("B1:R9").Select '------------------------------------------- With ActiveSheet.PageSetup ..PaperSize = xlPaperLetter ..Orientation = xlLandscape ..Zoom = False ..FitToPagesWide = 1 End With '------------------------------------------- ActiveWindow.SelectedSheets.PrintOut Preview:=True ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,1,""LANIER LD160c PCL 6Floor4 on Ne01:"",,TRUE,,FALSE)" NoPrint: Next Sh End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Newbie: Problem with 'Select Case' testing syntax | Excel Programming | |||
Select Case syntax | Excel Programming | |||
Select Case for Active Worksheet syntax. | Excel Programming | |||
Syntax for Select Case | Excel Programming | |||
Select Case syntax | Excel Programming |