SweetMisery
New member
- Local time
- Today, 08:17
- Joined
- Jul 6, 2012
- Messages
- 4
I am new to VBA codes and programming and I need your help desperately because I need this report done asap. 
I am making a simple data sheet in excel. I have sheets which contain supplier's information. I have made a home page which summarizes all the supplier names with hyperlinks to each supplier sheet. In the supplier sheet, I have set activex buttons: Previous Page, Home Page, Next Page. Here's the vba code I'm Using:
Private Sub CommandButton1_Click()
Worksheets("NAFFCO").Activate
End Sub
Private Sub CommandButton2_Click()
Worksheets("Home").Activate
End Sub
Private Sub CommandButton3_Click()
Worksheets("SFFECO").Activate
End Sub
but when I ran the vba code, I get an error message "Run time Error 9: Subscript out of range" on some of the sheets. I have used the same vba codes for all the 15 sheets but 3 sheets are giving me headache. :banghead:
Please reply with the corrections. Thanks!

I am making a simple data sheet in excel. I have sheets which contain supplier's information. I have made a home page which summarizes all the supplier names with hyperlinks to each supplier sheet. In the supplier sheet, I have set activex buttons: Previous Page, Home Page, Next Page. Here's the vba code I'm Using:
Private Sub CommandButton1_Click()
Worksheets("NAFFCO").Activate
End Sub
Private Sub CommandButton2_Click()
Worksheets("Home").Activate
End Sub
Private Sub CommandButton3_Click()
Worksheets("SFFECO").Activate
End Sub
but when I ran the vba code, I get an error message "Run time Error 9: Subscript out of range" on some of the sheets. I have used the same vba codes for all the 15 sheets but 3 sheets are giving me headache. :banghead:
Please reply with the corrections. Thanks!