Excel Workbook Running VBA Code After it Has Been Deleted

wgilthorpe

New Member
Joined
Dec 6, 2014
Messages
7
I have a workbook for creating quotations of our products.

In my main user form, I created a button to use
Code:
Application.FileDialog(msoFileDialogFilePicker)
to open another excel sheet to import pricing updates. This subroutine was giving me trouble, so I decided to scrap it. I deleted the entire sub.

Now, at random times, the open file dialog box will open. When I close it, it pops right back up. I have searched all the VBA code in the file and I have removed all code that opens this dialog. I have double and triple checked the modules. I am seriously considering starting from scratch.

Has anyone else had a similar experience? Any insight would be appreciated.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
It seems that you are calling on the file dialog somewhere. Try putting a break point on the first line of code for the button. Then step through the code to find where this dialog keeps coming up from. Make sure to reset the environment as well.

AKR22
 
Upvote 0
You can pretty much bet that there is code somewhere that is calling the dialog box. Just keep track of what event is initiated prior to the box appearing and it will lead you to where you should look. I suspect it is in a sheet code module embedded in a Worksheet_Change or Worksheet_SelectionChange macro.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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