VB error when using workbook on different laptop

redspanna

Well-known Member
Joined
Jul 27, 2005
Messages
1,602
Office Version
  1. 365
Platform
  1. Windows
Hi all

I have a Active X Combo box that provides user with a 'menu' to select an option from a drop down menu on the 'FRONT' worksheet on my workbook.
The VB code then runs according to what option is selected from the menu...

VBA Code:
Private Sub FrontMenu_Change()

With Sheets("Front").Range("A1")
   Select Case .Value
       Case "Add Daily Sales"
           UserForm1.Show
       Case "View Data Log"
                Sheets("Data").Select
       Case "View Year Totals"
                Sheets("Financial Year").Select
       Case "View Dashboard"
                Sheets("Dashboard").Select
       Case "Copy Dashboard Report"
                Call Save_Monthly_Dashboard
       Case "Print Dashboard Report"
                Call Print_Dashboard
       Case "Yearly Dashboard"
               Sheets("Dashboard2").Select
       Case "End Of Month Report"
                UserForm2.Show
       Case "Year On Year Review"
                 Sheets("YOY").Select
       Case "Desktop Dashboard"
                 Call Desktop_Dashboard
      
   End Select
End With
FrontMenu.Value = "* Sales *"
End Sub

this works perfectly until I copy the entire workbook to a different Laptop
When this happens and the option of "Add Daily Sales" is selected I get an error box stating RUN TIME ERROR 76 PATH NOT FOUND and this part of the code is highlighted

VBA Code:
 UserForm1.Show

The Userform is obvioulsy there because its working perfectly in the other version on another laptop

any ideas why this may be happeneing and suggstion to fix

Many thanks
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
In the VB editor click on Tools, Options, General & select "Break in class module", Ok.
Then try running the code again.
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,061
Messages
6,122,922
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top