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 

0
Luc
2/13/2010 4:42:46 PM
excel.programming 6508 articles. 2 followers. Follow

4 Replies
3637 Views

Similar Articles

[PageSpeed] 50

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" <lferr@live.be> a �crit dans le message de groupe de discussion : 
4E7FD67A-AE56-4A29-8850-EF002C7CC031@microsoft.com...
> 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 

0
Charabeuh
2/13/2010 5:19:46 PM
This seems to work...

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

-- 
Rick (MVP - Excel)


"Luc" <lferr@live.be> wrote in message 
news:4E7FD67A-AE56-4A29-8850-EF002C7CC031@microsoft.com...
> 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 

0
Rick
2/13/2010 6:48:39 PM
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" <lferr@live.be> wrote in message 
> news:4E7FD67A-AE56-4A29-8850-EF002C7CC031@microsoft.com...
> > 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 
> 
> .
> 
0
Utf
2/15/2010 2:59:01 AM
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 ??? 

0
Rick
2/15/2010 3:24:18 AM
Reply:

Similar Artilces:

Application Description
When I "put" my application to system tray, in the Windows 7 customizing of the system tray the "file description" is missing and "TODO: <FileDescription>" appears. How can I set this "<FileDescription>"? Thanks, Thomas "milonass" <milonass@discussions.microsoft.com> wrote in message news:9735F4B0-1FF7-4ED5-ADCD-51566DB120F7@microsoft.com... > When I "put" my application to system tray, in the Windows 7 customizing > of > the system tray the "file description" is missing and "TOD...

Printing with Publisher 2007--text doesn't show.
I have created a document in 2007, with colored type on a black background. When I try to print it...I only get the black background, no text, no images. I have tried to change the "Order", sending type/image to front. Nothing seems to work. HELP! Q You will never see color on black. A way around would be to outline the font and images in white. You can outline the text in the Format, Font. After you select outline, highlight the text, fill with white. Images are harder, if they are vectors you can select the image, ungroup, delete the background, group the rest, appl...

emailing directly from an application
Hello all, I am having trouble figuring out why when I try to email something directly from an application the message is returned as not able to be resolved (the address). Specifically, I created a cmd button in Access to create an email automatically with an attachment in word. When sent, I get a non-deliverable report (The e-mail address could not be found. Perhaps the recipient moved to a different e-mail organization, or there was a mistake in the address. Check the address and try again.). This happens not just in Access, but also in other apps such as Excel. This may help, ...

Raw PDO shows up as unspecified device in Windows 7
Hi all, I created a raw PDO for doing sideband communication for my HID multi-touch minidriver. I have also installed a UMDF driver on top of that raw PDO. What I just found is: now I have a new device shows up in "Devices and Printers" and listed as "Unspecified" device. Is there a way to prevent my raw PDO shows up in "Device and Printers" at all? Or is there a way to put it under the proper category? Thanks. G. report in the device caps that it should not be displayed in the UI d "gti4ever" wrote in message news:97BAF8...

Dialog inherit
I need to create some class base on CDialog and with same special virture functions,and also can edit Dialog easily in VC6++ Dialog editor. How can I to Declare my classes For exampl Parent Class "Papa" base on CDialog,has virtual function GetName() {return("Papa")}; and other controls The Child Class "Child1" inherited from Papa,hasvirtual function GetName() {return("Child1");} and other controls The Child Class "Child2" inherited from Papa,has virtual function GetName() {return("Child2");} and other controls So i can use the ...

Novice Question
Ok, firstly, sorry for the very general question! Basically, I have coded a program using MFC. It is Dialog Based and consists of some textfields and a few buttons. My program is called DCP and the App Wizard created a DCP.cpp and DCPDlg.cpp files for me (and a few others). The bulk of the functionality of my program is written in the DCPDlg.cpp file - is this correct? For example, when I created a button and clicked on it in the resource (dialog) view it automatically puts a function for it in the DCPDlg.cpp file i.e. void CDCPDlg::OnButtonPrint() { // Do some stuff here } I have ne...

Pivot Table selection that will allow Grouped fields to show up in each cell
Hello - Is there a Pivot Table selection that will allow Grouped fields to show up in each cell? The standard view generates a blank in each new row...but I need to be able to display the grouped data in each cell, rather than a blank if possible. For example: Month State Amount Jan TN 500 Blank KY 300 Blank GA 25 Feb TN 35 Blank KY 28 I am hoping there is a pivot table option that will allow me to display "Jan" instead of blanks in the above example Not through xl2007. I don't know about xl201...

Installing an A2002 application under A2003
Hello, I'm using Access 2002, with Office Developper Edition. I just packed an application with the ODE, sent it to a customer. He clicked on setup, and then has been warned that Access 2003 is neeed!! He is actually using Access 2003, installeed on his pc. I'm surprised that an A2002 application can't be installed with A2003. Do you know if there would be any workaround? TIA Philippe If this is an MDB in Access 2002/2003 file format, and you compiled and created an MDE under Access 2003, then it won't work under Access 2002. Every version of Access uses a different bin...

Possible to take a SNAPSHOT of a common dialog box?
Hi, I wrote a generic function that takes a "CDialog" type input as a parameter. My function then does a "Create()" on it (making a modeless dialog), leaving off the WS_VISIBLE style so that its not visible on the screen. It then sends it a WM_PRINT message.. the result is that I am able to take a "snapshot" of a dialog into a HBITMAP object without the dialog ever appearing on the screen. This works for CDialog and CPropertySheet, etc. Basically any object that responds to a WM_PRINT would work. Then I tried to do the same with a CFileDialog. Well, obviou...

Creating a dialog from a COM dll
I am trying to display a CDialog derived class froma dll using COM. The COM stuff is working. It seems that my dialog is failing to create its own m_hWnd: void __stdcall CMattDlgCmpnt::HtmlMsgBox( HWND wndParent, BSTR strmsg ) { CWnd* pWnd = new CWnd(); pWnd = CWnd::FromHandle(wndParent); CNormalDlg *wndNormalDlg = new CNormalDlg( pWnd ); wndNormalDlg->DoModal(); } Debugging yields the following: {CNormalDlg hWnd=0x00000000} I tried doing this as well: CNormalDlg *wndNormalDlg = new CNormalDlg( pWnd ); wndNormalDlg->Create(IDD_DIALOG1); wndNormalDlg->ShowWindow(SW_SHOW); But th...

Outlook Address book dialog
We have a Winforms C# application. How can I get access to the Outlook address book (as is shown by Outlook) from within our application. When the users select email addresses, I want to paste them into a text field. You would need to use CDO 1.21 (which is not supported in .NET = langauges), Redemption (http://www.dimastr.com) or the Address Book = wrapper (msosvabw.dll). See = http://www.outlookcode.com/d/code/selectnames.htm for a CDO example; = Redemption works largely the same.=20 FYI, there is a newsgroup specifically for general Outlook programming = issues "down the hall"...

Show value with 2 condition in a column
Hi Expert, Example , I have this table Items Country Pric Banana USA $ 22 Banana Canada $ 2 Mango Canada $ 25 Orange France $ 2 Apple USA $ 33 Orange Canada $ 2 What is the formula to find a price by giving 2 condition of Items and country Thanks. Hi try something like the following array formula (entered with CTRL+SHIFT+ENTER): =INDEX(C1:C100,MATCH(1,(A1:A100="Banana")*(B1:B100="USA"),0)) or try =SUMPRODUCT(--(A1:A100="Banana"),--(B1:B100="USA"),C1:C100) ...

How to modify size of dialog while in OnSize()?
I've got a dialog box that, when resized, I'd like to enforce a specific width-->height ratio. I can run my algorithm in the OnSize() to determine the correct size based on how much the box is currently being resized, but if I call something like SetWindowPos() while in OnSize(), OnSize() is called again and I'm in an infinite loop. I suppose I can wait for the mouse button to be released and then resize, but that seems like a hassle. I'd appreciate any help, thanks. ~billy Look at WM_SIZING/OnSizing() "billy" <billy_dev#@#cox#.#net> wrote in message ne...

Architecting VC++ 6.0 Applications
Sorry for the last post, wrong keystrokes prematurely sent message. In short, I have an ATL out-of-process COM server that sits between a VB client and another ATL server. I fires events/receives method calls to/from the VB client AND makes method calls/sinks events to/from the other ATL server. Internally it seems to have one 'main' CDialog' application (thread?). It uses the PostMessage (e.g. theApp.m_pMainWnd->m_hWnd inside COM method calls received from VB client) extensively and MANY timers and the 'OnTimer' method inside the main dialog class. I'm ju...

business income not showing up as revenue
When I make deposits into my business checking account, they show up correctly as income on my profit/loss statements. However, on my MSMoney home page, I have Business Snapshot as one of my views. On the revenue line, it is zero. Why? When I click on the Year to Date Revenue link, it correctly shows my Profit and Loss statement with the correct amount under Total Net Sales and Gross Profit. Why doesn't this translate into the Year to Date Revenue line? I'm not certain, but it may be connected to your schedule c mapping. My business snapshot is correct, but all of my accounts ar...

OLE Server fail to show the file in Browser.
Hi All, I have made a SDI Project using MFC AppWizard as - In Step 6, I have Selected CHtmlView as Base class of View class. In Browser View, I show WORD files. Sometimes a WORD file (may be corrupted or due to any other reason) can not be shown by WORD. Then, an Error Page "The page can not be displayed" shown in the Browser View. This is due to OLE server (in this case MS WORD) failure. Instead of this page, I want to to do some else activity. HOW CAN I FIND THAT FILE IS SHOWN CORRECTLY OR NOT IN BROWSER ? Plz, Reply ASAP. BEST REGARDS, ...

Cash flow doesn't show up
Money 2007 Deluxe Whenever I click on the Cash Flow icon the screen jolts a little and stays wherever it was, Money doesn't show me the cash flow. I tried to repair (quick and standard) with no avail. I manage two different files with Money (my own money and my mother's) and this only happens on one of them. Some suggestions? TIA Haven't seen reports of this for a while. Therefore, the following may not help. See if http://umpmfaq.info/faqdb.php?q=67 helps. "Hakama" <hakamanoir@gmail.com> wrote in message news:%23qQL3cT2JHA.1644@TK2MSFTNGP02.phx.gbl... &g...

Internet Explorer 8 will not open; Outlook 2007 emails not showing
I'm having the biggest issue with Windows 7 right now. I have installed Win7 Professional and had been using it fine with IE8/Firefox and MSOffice 2007 Ultimate. About 2 weeks ago, I had a massive email download (over 1000 emails, broken up to around 270 at a time) from Gmail. This is when I noticed that the HTML would not show up in emails that were listed as Safe Senders. Also, IE8 will not open. There are no error messages. If I click on IE enough times, I barely get to see iexplore.exe show up in the Task Manager before it disappears. Firefox works fine and has bee...

mass emails...... outlook showing sent but not received by anyone
New computor....I must have something set up different than before in Outlook because the email blast appears to have been sent (shows in sent file) but not received. I have been sending this blast successfully for several years, but with new computor having troubles. Any ideas? is your SMTP server blocking them as spam? or their server treating them as spam? -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http:...

How identify data of two coulams,Every cell count and show result
Q1. How identify data of two coulams Q2. Every cell count and show result like I need like Coulam A Coulam B 500 1 500 2 500 3 800 1 800 2 800 3 800 4 800 5 800 6 600 1 600 2 600 3 600 4 700 1 700 2 I want to count like coulam B i have data in coulam A and like this I have two coulam with name as lower,upper,propercase i want to do all in same case like in proper case how? Hi In column B enter =COUNTIF($A$1:A1,"=&...

exit application bug
Hi, I have a very usual bug. I have an mde database that is split in a server. Each user have their own copy of the front end of the database. I don't have any problems with it so far (crossing my finger) but the only problem that I have is when the user exit the application. When the user exit the application I have code to ask if the user really want to exit. I have a form on current: Private Sub Form_Current() Populate_Description End Sub before update: Private Sub Form_BeforeUpdate(Cancel As Integer) If IsNull(Me.[PART_NUMBER]) = True Then MsgBox "You mus...

Application returns ras error 678 No answer under virtual PC 2004
Hi I hope that i have posted this question to the correct group, if not i am sorry. I have an application that connects to the Internet using RAS. In the real world there are many copies of the program running without issue. Under Virtual PC 2004 SP1(Windows 98 and others) the program fails to connect with error 678 No Answer very early on during the modem negotiation phase. However Using dial up networking the modem can establish a connection. I was hoping to be able to use Virtual PC to perform the majority of the testing with this application. As such i would be very greatful if ...

How To add a Extra Control in a File Open Dialog
Hi, I want to add a Extra Control like Combobox or TextBox and Label in Microsoft CommonDialog Control Regards Senthil one question would be sufficient. see below ;-) ...

Public folders not showing on all Outlook clients
Hi I have Exchange Server 2003 on SBS 2003. Every Outlook user has his own Public folders created and has given permission for other users to read the public folders. The problem is the other users do not see these public folders that have been shared. I have even added permissions on Exchange System Manager in Public folders but still they cannot see one anothers Public folders! Please help! Chris <chris.l@actionprgroup.com> wrote: >I have Exchange Server 2003 on SBS 2003. Every Outlook user has his own >Public folders created and has given permission for other users t...

Show a previous instance of app running in system tray
Hi, I have an app that runs in the system tray and you click on the icon to use functions within the app. Occasionally I have noticed that for some reason the app is running but no icon is showing in the system tray, which means you cannot access the app. When I start a new instance of the app it tells me that the app is already running and then shuts down the new instance. I have tried the following code, but since the app is only running in the system tray I cannot show the app. Is there a better way to do this so that I can get the apps icon to appear in the system tray...