ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA to simulate the enter button? (https://www.excelbanter.com/excel-programming/337223-vba-simulate-enter-button.html)

Bob O[_2_]

VBA to simulate the enter button?
 

Hello All,
I was wondering if there is a way to write vba code that would simulate
the enter button being pressed at set time intervals? Right now I have
to hit the enter button for my changes to take affect in Excel but I
really need this to be automatic.

Any help is appreciated,
Bob O


--
Bob O
------------------------------------------------------------------------
Bob O's Profile: http://www.excelforum.com/member.php...o&userid=26282
View this thread: http://www.excelforum.com/showthread...hreadid=395692


Tim Williams

VBA to simulate the enter button?
 
Do you mean in response to something a macro is doing, or just
clicking "OK" during normal interactions with Excel?

Maybe you could provide a specific example of what you would like to
happen.

Tim


"Bob O" wrote in
message ...

Hello All,
I was wondering if there is a way to write vba code that would
simulate
the enter button being pressed at set time intervals? Right now I
have
to hit the enter button for my changes to take affect in Excel but I
really need this to be automatic.

Any help is appreciated,
Bob O


--
Bob O
------------------------------------------------------------------------
Bob O's Profile:
http://www.excelforum.com/member.php...o&userid=26282
View this thread:
http://www.excelforum.com/showthread...hreadid=395692




Bob O[_3_]

VBA to simulate the enter button?
 

Tim,
Thanks for the reply. I have a macro that runs every 5 sec. that takes
data from and Access table and places it in to an Excel worksheet. I
then need to send this out to a PLC on our production floor for quality
inspection reasons. Right now I am simulating our scheduling software by
typing in the data manually and I have to hit enter and then going into
the excel spread sheet and hitting enter before all the updates work. I
am hoping that I can place a number in the access table without hitting
enter and have a VBA macro simulate the enter button in both Access and
Excel.

Hope this makes more sense,
Bob O


--
Bob O
------------------------------------------------------------------------
Bob O's Profile: http://www.excelforum.com/member.php...o&userid=26282
View this thread: http://www.excelforum.com/showthread...hreadid=395692


Tim Williams

VBA to simulate the enter button?
 

"Bob O" wrote in
message ...

Tim,
Thanks for the reply. I have a macro that runs every 5 sec. that takes
data from and Access table and places it in to an Excel worksheet. I
then need to send this out to a PLC on our production floor for quality
inspection reasons.


"Send" means what? How is the data being sent?

Right now I am simulating our scheduling software by
typing in the data manually and I have to hit enter and then going into
the excel spread sheet and hitting enter before all the updates work. I
am hoping that I can place a number in the access table without hitting
enter and have a VBA macro simulate the enter button in both Access and
Excel.


What are you "hitting enter" on? Do you mean you are responding to
dialogs/messagboxes with (eg) OK/Cancel buttons? If so, what questions are
the dialogs asking?

To update the access table "without hitting enter" you could look into using
a macro from Excel, but I'm not sure why you wouldn't just enter this number
directly in excel instead of first putting it in Access only to have Excel
query it back out.....

More explanation is needed.

Regards,
Tim.

--
Tim Williams
Palo Alto, CA







Hope this makes more sense,
Bob O


--
Bob O
------------------------------------------------------------------------
Bob O's Profile:

http://www.excelforum.com/member.php...o&userid=26282
View this thread: http://www.excelforum.com/showthread...hreadid=395692





All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com