Named arguments for built in dialogs

J

Jan Kronsell

Hi NG

I like to show the print dialog with the Print Selection selected. But I
cant figure out how to do it:

I use
Application.Dialogs(xlDialogPrint).Show

but when i try to add an argument, like print_what it do not kno the named
agument. And besides I cans find anywhere the cvalues the arguments can
have. Can anybody help here?

Jan
 
J

Jan Kronsell

I have serch the VBA help, amd found the Built-in dialogs arguments list -
and it tells me about the named arguments allright, but not how to use them.

I tried with something like

Application.Dialogs(xlDialogPrint).Show Selection:=True

But without luck

Jan
 
T

Tom Ogilvy

You can't use named arguments. You have to use positional arguments.

--
Regards,
Tom Ogilvy

Jan Kronsell said:
I have serch the VBA help, amd found the Built-in dialogs arguments list -
and it tells me about the named arguments allright, but not how to use them.

I tried with something like

Application.Dialogs(xlDialogPrint).Show Selection:=True

But without luck

Jan
 
J

Jan Kronsell

Thanks. Can you tell me the values for the arguments in this case, or direct
me to when i can finde them?

Jan


Tom Ogilvy said:
You can't use named arguments. You have to use positional arguments.
 
J

Jan Kronsell

I figured it out. Thanks!

Even if
Application.Dialogs(xlDialogPrint).Show , , , , , , , , , , , 1

looks a bit strange :)
Jan
 

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

Top