inputbox and application.run macro1

M

Michael Joe

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
 
T

Tom Ogilvy

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?
 
M

Michael Joe

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

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


.
 
T

Tom Ogilvy

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 said:
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

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


.
 
Top