inputbox and application.run macro1

  • Thread starter Thread starter Michael Joe
  • Start date Start date
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
 
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?
 
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


.
 
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


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top