Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Application.Dialogs(xlDialogPrint).Show

Hoi there,

I want to use the code "Application.Dialogs(xlDialogPrint).Show", but by
default i would like that 'All the worksheets" are selected when this
dialog opens.

Can it be done ???


Thanks,

Luc

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Application.Dialogs(xlDialogPrint).Show

Hello

To select a worksheet and to made it the selected worksheet:
Worksheets("MyName").select

To select a worksheet and to add it to the actual selection of worksheets :
Worksheets("MyName").select False

To select all the worksheet:

Sub SelectAllWorksheets()
Dim xW As Worksheet

Worksheets(1).Select
For Each xW In Worksheets
xW.Select False
Next xW

End Sub










"Luc" a écrit dans le message de groupe de discussion :
...
Hoi there,

I want to use the code "Application.Dialogs(xlDialogPrint).Show", but by
default i would like that 'All the worksheets" are selected when this
dialog opens.

Can it be done ???


Thanks,

Luc


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Application.Dialogs(xlDialogPrint).Show

This seems to work...

Application.Dialogs(xlDialogPrint).Show 2,1,ThisWorkbook.Sheets.Count

--
Rick (MVP - Excel)


"Luc" wrote in message
...
Hoi there,

I want to use the code "Application.Dialogs(xlDialogPrint).Show", but by
default i would like that 'All the worksheets" are selected when this
dialog opens.

Can it be done ???


Thanks,

Luc


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Application.Dialogs(xlDialogPrint).Show

Luc

Group selection of a number of sheets is a nice feature especially for
printing but note that it can also be a very dangerous feature and that I
suggest that after closing the print dialog you have code to select only one
sheet so as to avoid corruption in active but not visible sheets.

Within the print dialog there is the ability to select the whole workbook -
a better idea would be to be able to open the dialog with that option set and
if someone can enlighten one on how I would be very pleased.
--
Ken
"Using Dbase dialects since 82"
"Started with Visicalc in the same year"


"Rick Rothstein" wrote:

This seems to work...

Application.Dialogs(xlDialogPrint).Show 2,1,ThisWorkbook.Sheets.Count

--
Rick (MVP - Excel)


"Luc" wrote in message
...
Hoi there,

I want to use the code "Application.Dialogs(xlDialogPrint).Show", but by
default i would like that 'All the worksheets" are selected when this
dialog opens.

Can it be done ???


Thanks,

Luc


.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Application.Dialogs(xlDialogPrint).Show

See inline comments...

Group selection of a number of sheets is a nice feature especially for
printing but note that it can also be a very dangerous feature and that I
suggest that after closing the print dialog you have code to select only
one
sheet so as to avoid corruption in active but not visible sheets.


No where in my posting did I select all the sheets in the workbook (not did
I say the user should do that manually either)... the single line of code I
posted simply calls up the print dialog box with the option to print all the
sheets selected **in the dialog box only**... this does not select any
sheets in the workbook nor is it dependent on that being done.

Within the print dialog there is the ability to select the whole
workbook -
a better idea would be to be able to open the dialog with that option set
and
if someone can enlighten one on how I would be very pleased.


I actually had that option working... once... but when I experimented with
other settings, I found I could no longer make the "select whole workbook"
option work again. Not being sure why this was the case, I figured it was
safer to offer the method I posted which always worked for me no matter what
other settings I tried.

--
Rick (MVP - Excel)


This seems to work...

Application.Dialogs(xlDialogPrint).Show 2,1,ThisWorkbook.Sheets.Count


I want to use the code "Application.Dialogs(xlDialogPrint).Show", but
by
default i would like that 'All the worksheets" are selected when this
dialog opens.

Can it be done ???


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.Dialogs(xlDialogPrint).Show - prints too soon Almagg via OfficeKB.com Excel Discussion (Misc queries) 3 April 27th 07 08:17 PM
returning values application.dialogs(...).show Pringles. Excel Programming 2 July 31st 06 04:11 PM
Application.Dialogs(xlDialogSendMail).Show James T Excel Programming 1 July 18th 06 03:34 AM
application.dialogs(xlDialogPrint) - arguments David Excel Programming 0 October 17th 05 08:01 AM
Problems with application.Dialogs(xlDialogFormulaFind).Show lydya Excel Programming 2 December 18th 04 05:02 PM


All times are GMT +1. The time now is 06:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"