How to handle textbox value if use doesnt hit enter

gdesreu

Active Member
Joined
Jul 30, 2012
Messages
318
I have a textbox that the user will use to paste a filepath into. The issue is the user often just pastes the path in, then clicks run. The filepath fails because the user did not hit "enter" after pasting the path. Is there a way to automate this so I don't have to worry about this issue? In other words force the enter when the run key is pressed. I can do it with listboxes
Code:
Me.List36 = Me.List36.ItemData(0)
but this doesn't work on text boxes. Any ideas?
Thanks
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
in the Run button click,
have it save the record , THEN run the code

Code:
sub btnRun_click()
  DoCmd.RunCommand (acCmdSaveRecord)
  'run button code here
end sub
 
Upvote 0
in the Run button click,
have it save the record , THEN run the code

Code:
sub btnRun_click()
  DoCmd.RunCommand (acCmdSaveRecord)
  'run button code here
end sub

You sir....are awesome. Exactly what I was looking for. Thanks!
 
Upvote 0

Forum statistics

Threads
1,221,704
Messages
6,161,390
Members
451,701
Latest member
ckrings

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