I'm am very new to vba for excel and having a hell of a time with it.

I am trying to create a program for small business that will be used by admin and managers to quote jobs, check/update work schedule, check inventory and such.

I have a main workbook containing multiple userforms for Login, and procedure choice to only allow individuals to perform chosen tasks.

I am trying to create a userform that includes several checkboxes, one for each possible task, a command button ("CmbIntroNext") and a command button ("CmbLogout"). Each task when chosen should open a different corresponding workbook when "CmbIntroNext" is clicked.

So far I have the following code:


Private Sub CmbIntroNext_Click()

If cmbCreateQuote <> True Then
Exit Sub
Else
frmIntroduction.Hide
frmQuote_1.Show
Exit Sub

If cmbCheckInventory <> True Then
Exit Sub
Else
frmIntroduction.Hide
Workbooks("Inventory.xlsm").Activate
Sheets("shInventory").Select
Range("A1").Select
Exit Sub

If cmbSchedule <> True Then
Exit Sub
Else
frmIntroduction.Hide
Exit Sub

If cmbUpdateSchedule <> True Then
Exit Sub
Else
frmIntroduction.Hide
End If

If cmbCreateInvoice <> True Then
Exit Sub
Else
frmIntroduction.Hide
Exit Sub

If cmbCreateInvoice <> True Then
Exit Sub
Else
frmIntroduction.Hide
Exit Sub
End If
End Sub

Private Sub CmbLogout_Click()

frmIntroduction.Hide
frmLogin.Show

End Sub

__________________________________________
The first block of If statement works without the rest because it requires an additional userform before entering a workbook but that's because this is as far as I have gotten so far.

The second block of If statement is where I am having a problem.
How do I get the corresponding "Inventory" workbook to open, activate and select a specific cell to start on.

Once I figure out how to do it for the second block, I will be able to modify the commands to the other checkboxes.

Please help!

This article has been dead for over six months. Start a new discussion instead.