VBA to automate text input into input box

energywatch

New Member
Joined
Feb 4, 2014
Messages
6
I am in need of VBA code so that I can fill out an input form generated by someone elses macro input box. (I am the user, not the one developing the input box).

I am working to streamline a whole cluster of macros and this input box is currently my bottleneck. When the input box pops up, instead of me manually typing, I want to autofill the space with "104" and then click 'ok' uisng VBA.

I can not modify the actual VBA that created the input box (ie make 104 the default) because other users need the box to be blank.

I have searched for this function many places and sofar only find out how a developer would change the original vba code, not how a user can interact with an input box by using vba.

Thank you in advance,
Janette
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Maybe you could make your VBA code identify the user and set an input box default if you are the user and leave it alone for everyone else?

Gary

Code:
If Application.UserName = "Janette" Then
    'Make input box default to 104
Else
    'Leave input box alone
End If
 
Upvote 0
Hi Gary,

I am not allowed to modify the original VBA code, it is protected. I, as the user, interact with these macros as a user, not a developer. I therefore can not change any of the original VBA code that causes the input box to appear. I need an independent macro that references the input box when it appears, fills it in and clicks ok. I can not change the behavior of the input box directly. If I could, your idea would be a good one.
 
Upvote 0

Forum statistics

Threads
1,216,246
Messages
6,129,700
Members
449,528
Latest member
Paula03

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