Auto click "Submit" or "OK" button

Ramiel

New Member
Joined
Mar 29, 2017
Messages
2
Hello,

Good day everyone.

I need help on excel vba. A small excel vba application was created to capture the In/Out of equipments with the use of colleagues ID.

Is there a way that will automatically click the "Submit" button or click spacebar without using the mouse or keyboard?

Thanks.


1605452920581.png
 

Some videos you may like

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

6StringJazzer

Well-known Member
Joined
Jan 27, 2010
Messages
810
Office Version
  1. 365
Platform
  1. Windows
What action do you want to cause the click to happen? The reason this dialog has a Submit button is that only the user knows when both fields have been completely typed.
 

Ramiel

New Member
Joined
Mar 29, 2017
Messages
2
User will just scan their ID with password and that's it. No confirmation is required.

Below is the code;

Private Sub CommandButton1_Click()

If TextBox1.Value = "" Then
TextBox1.BackColor = vbRed
MsgBox ("Equipment number is required. Please scan the equipment barcode")

Call resetForm

End If

If TextBox2.Value = "" Then
TextBox2.BackColor = vbRed
MsgBox ("You Login ID is required. Please scan your ID to proceed")

Call resetForm

End If


ActiveCell = TextBox1.Value
ActiveCell.Offset(0, 1) = TextBox2.Value
ActiveCell.Offset(0, 2) = TextBox3.Value

ActiveCell.Offset(1, 0).Select
Call resetForm


End Sub
 

6StringJazzer

Well-known Member
Joined
Jan 27, 2010
Messages
810
Office Version
  1. 365
Platform
  1. Windows
There is a lot of information missing in your description. Your first post did not mention scanning of anything. The code refers to a equipment number, not shown in your first post. The code also refers to a user ID, but there is no reference in the code to a password so my first post still stands. If the user is typing the password you have to have a way for the user to indicate they have completed typing.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,222
Messages
5,623,472
Members
415,973
Latest member
johnemaile

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
Top