ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   inputbox and application.run macro1 (https://www.excelbanter.com/excel-programming/306924-inputbox-application-run-macro1.html)

Michael Joe

inputbox and application.run macro1
 
I have basic code running a macro in a excel sheet.
i want to set the input box automatically to yes.
Then finish running the macro...

Other idea is to:
there is a default of yes so I could do a msgbox type of
thing with excel.Application.DisplayAlerts = False but
for a inputboxs.

Mike

Tom Ogilvy

inputbox and application.run macro1
 
here are the arguments to InputBox
InputBox(prompt[, title] [, default] [, xpos] [, ypos] [, helpfile,
context])

so if you did

sAns = InputBox( Default:="Yes")

or are you thinking of a message box?

--
Regards,
Tom Ogilvy

"Michael Joe" wrote in message
...
I have basic code running a macro in a excel sheet.
i want to set the input box automatically to yes.
Then finish running the macro...

Other idea is to:
there is a default of yes so I could do a msgbox type of
thing with excel.Application.DisplayAlerts = False but
for a inputboxs.

Mike




Michael Joe

inputbox and application.run macro1
 
the input box comes up. i want to in vb code (outside
excel) run the macro and say yes to the input box ?
so no pop ups


-----Original Message-----
here are the arguments to InputBox
InputBox(prompt[, title] [, default] [, xpos] [, ypos]

[, helpfile,
context])

so if you did

sAns = InputBox( Default:="Yes")

or are you thinking of a message box?

--
Regards,
Tom Ogilvy

"Michael Joe"

wrote in message
...
I have basic code running a macro in a excel sheet.
i want to set the input box automatically to yes.
Then finish running the macro...

Other idea is to:
there is a default of yes so I could do a msgbox type

of
thing with excel.Application.DisplayAlerts = False but
for a inputboxs.

Mike



.


Tom Ogilvy

inputbox and application.run macro1
 
Unless the author of the code has made provisions for suppressing or
providing input to the inputbox through code, then I don't think you can do
that with you code other than using Sendkeys, which would be very flakey in
this instance if successful at all.

--
Regards,
Tom Ogilvy

"Michael Joe" wrote in message
...
the input box comes up. i want to in vb code (outside
excel) run the macro and say yes to the input box ?
so no pop ups


-----Original Message-----
here are the arguments to InputBox
InputBox(prompt[, title] [, default] [, xpos] [, ypos]

[, helpfile,
context])

so if you did

sAns = InputBox( Default:="Yes")

or are you thinking of a message box?

--
Regards,
Tom Ogilvy

"Michael Joe"

wrote in message
...
I have basic code running a macro in a excel sheet.
i want to set the input box automatically to yes.
Then finish running the macro...

Other idea is to:
there is a default of yes so I could do a msgbox type

of
thing with excel.Application.DisplayAlerts = False but
for a inputboxs.

Mike



.





All times are GMT +1. The time now is 02:59 AM.

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