Why does my userform code activate when not called on?

MPW

Well-known Member
Joined
Oct 7, 2009
Messages
571
Office Version
  1. 365
Platform
  1. Windows
Hello,
I have a cancel button. The only code attached to this button is:
Code:
Unload InfoForm1
However when the button is clicked it runs another routine
VBA Code:
Sub NoteTaker()
This NoteTaker routine should only called on when the "InfoForm" is activated from a different userform.
This sub runs normally when used to open the userform, but crashes at
Code:
InfoForm1.Frame4.Enabled = False
when using my cancel button.
I have tried to put break points above where the debug happens, but it skips right over the break point and still hits the debug.
Hopefully this makes sense, if not I can add more information.
 
I have been trying to implement new methods as I learn their purpose. This workbook goes back to the Pre-Cambrian age of my coding journey. As I am allowed to add features I try to update the some of more offensive code. Self taught by need, leaning on the MrExcel brain trust along the way. As always, a pleasure.
 
Upvote 0

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Well, we're here when you need us. :)
 
  • Like
Reactions: MPW
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,588
Members
449,089
Latest member
Motoracer88

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