Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I am having trouble with a Select Case Statement. I have about 6 reports that I would like one command button to preveiw based on which Optionbutton is Selected. This is a code that I use in Access but not having any luck in excel can someone tell if this can been done and how Thanks Private Sub cmdPrint_Click() Dim strWhere As String 'strWhere = (DatePicker?) On Error GoTo PrintPreviewError Select Case Me.ReportsGroup Case 1 DoCmd.OpenReport "Payroll-Full Time", acViewPreview, , strWhere DoCmd.Maximize Case 2 DoCmd.OpenReport "Payroll-Part-time", acViewPreview, , strWhere DoCmd.Maximize Case Else MsgBox "Select A Report!!!!!!!" End Select PPNormalExit: Exit Sub PrintPreviewError: Resume PPNormalExit Exit Sub End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
UserForm OptionButtons | Excel Discussion (Misc queries) | |||
Naming UserForm CommandButtons using VBA | Excel Programming | |||
Using For/Next Loop To Generate 4 CommandButtons On A UserForm Results In A Runtime Error 91 | Excel Programming | |||
Commandbuttons | Excel Programming | |||
Need help creating a userform with optionbuttons | Excel Programming |