VBA Problem

Farback

Board Regular
Joined
Mar 27, 2009
Messages
149
I'm having a problem with a spreadsheet I have designed. It is fairly simple, 6 worksheets each with several Combo Boxes from the Control Toolbox menu. The Combo boxes simple have a list of numbers 0-4, and when a selection is made, there is some code in the Change event to 'Park' the curser:
Private Sub ComboBox1_Change()
Sheets("Sheet2").Select
Sheets("Sheet2").Range("A1").Select
End Sub
Everything works fine, until....
When I try to re-save the workbook as a new filename (and this will be necessary when it is complete), I get a "Run-time error '1004' Select method of Worksheet class failed". When I click debug, it highlights the "Sheets("Sheet2").Select" part of the code. When I close the debug dialogue, the workbook seems to flicker through all the Change events and then saves (and works) as normal.
There is no coding in the 'Workbook_BeforeSave' event, so why is it trigering a change event? Any help appreciated.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,223,307
Messages
6,171,326
Members
452,396
Latest member
ajl_ahmed

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