Active X Control button validation

Rob-UK

New Member
Joined
Dec 18, 2011
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Hiya! I have inherited a form that users then send to a BOT to be processed. The "submit" button opens Outlook and creates an email to the BOT, attaching the completed form.
I have applied various Data Validations to cells within the form and would like to add some VBA coding to check certain cells have been completed before the "submit" button is visible.
Through searching the internet, I have found various codings that seem to be what I want, but which do not work on the sheet!

I think the button is an 'ActiveX Control' button as opposed to a standard button, but am not 100% sure! In the coding that creates the email, it appears the button is called EmailFCCBOTControl()

Is there anyone out there that can help me figure out the correct type of coding I need? I can work out the validation, but for the purposes of this example, lets say it is Sheet1 and that I want to ensure that there is data is cells I21,I22,I24,I25 and that the value in cell L52 is 360 or less.

Thanks so much in advance!

Rob
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
UPDATE - on the basis that when I right click on the Control button, it shows me Assign Macro, I believe this means it is not an ActiveX control but is a Form Control ?! (screenshot attached)
1653484218713.png
 
Upvote 0
Still struggling with this! In VBA the submit button appears to be referred to as Sub EmailFCCBOTControl() but when I select it on the sheet it shows a name of Button1 . Sure this is simpler than i'm making it !
 
Upvote 0
The submit button has a macro assigned to it. Right-click on the button, and click on Assign Macro. It will show you a list of available macros, and the one in the top box will be the assigned one. Click Edit to view that macro in the VB Editor.

Then in the beginning part of this macro, test for values where they are required. If any are missing, use MsgBox to alert the user and then exit the sub before going to Outlook.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,269
Members
449,075
Latest member
staticfluids

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