Help with macro to choose printer

Hi,

I am new to macros in Excel and this is what I did to print a worksheet:
------------------------------------------------------------------------
 Range("A1:W35").Select
    ActiveSheet.PageSetup.PrintArea = "$A$1:$W$35"
    Selection.PrintOut From:=1, To:=1, Copies:=1, Collate:=True
End Sub
------------------------------------------------------------------------
Works great  except that  I want to select the printer to use and the macro 
won't stop at the point to choose printer.
Any way to work around this?
Any help is greatly appreciated.
Emilio
0
12/20/2004 11:07:06 PM
excel.newusers 15348 articles. 2 followers. Follow

2 Replies
305 Views

Similar Articles

[PageSpeed] 8

Emilio,this will bring up the print dialog box, so you can pick a printer,
will that work?
Application.Dialogs(xlDialogPrint).Show


-- 
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Wind54Surfer" <Wind54Surfer@discussions.microsoft.com> wrote in message
news:B9C060D3-E95D-4801-B20A-A07952DE5E35@microsoft.com...
> Hi,
>
> I am new to macros in Excel and this is what I did to print a worksheet:
> ------------------------------------------------------------------------
>  Range("A1:W35").Select
>     ActiveSheet.PageSetup.PrintArea = "$A$1:$W$35"
>     Selection.PrintOut From:=1, To:=1, Copies:=1, Collate:=True
> End Sub
> ------------------------------------------------------------------------
> Works great  except that  I want to select the printer to use and the
macro
> won't stop at the point to choose printer.
> Any way to work around this?
> Any help is greatly appreciated.
> Emilio


0
12/20/2004 11:20:50 PM
Perfect!
Thanks Paul

"Paul B" wrote:

> Emilio,this will bring up the print dialog box, so you can pick a printer,
> will that work?
> Application.Dialogs(xlDialogPrint).Show
> 
> 
> -- 
> Paul B
> Always backup your data before trying something new
> Please post any response to the newsgroups so others can benefit from it
> Feedback on answers is always appreciated!
> Using Excel 2002 & 2003
> 
> "Wind54Surfer" <Wind54Surfer@discussions.microsoft.com> wrote in message
> news:B9C060D3-E95D-4801-B20A-A07952DE5E35@microsoft.com...
> > Hi,
> >
> > I am new to macros in Excel and this is what I did to print a worksheet:
> > ------------------------------------------------------------------------
> >  Range("A1:W35").Select
> >     ActiveSheet.PageSetup.PrintArea = "$A$1:$W$35"
> >     Selection.PrintOut From:=1, To:=1, Copies:=1, Collate:=True
> > End Sub
> > ------------------------------------------------------------------------
> > Works great  except that  I want to select the printer to use and the
> macro
> > won't stop at the point to choose printer.
> > Any way to work around this?
> > Any help is greatly appreciated.
> > Emilio
> 
> 
> 
0
12/21/2004 12:09:07 AM
Reply:

Similar Artilces:

Is there a way to attach a xslt template to a xsltargumentlist? please help!
in C#, I use the following way to do transform, the I assign my extension object to the xslArg, so in xsl, I can call functions in the extension object. Now, I want functions in the extension object to call template in the xsl, this way I can put some customized code into the template. I think it is reasonable, but I don;t know how to do it, anyone has some idea on this? Thanks. xslt.Transform(xmlDoc, xslArg, textHTML, null); david wrote: > in C#, I use the following way to do transform, the I assign my extension > object to the xslArg, so in xsl, I can call functions in the extens...

MACRO development question
In word, the easy way to write a macro is to record it, then make any alterations. 1. Is there a way to do this with Visio 2002? 2. Does anyone have a macro to export to another image format (esp PCX) they would be willing to share? TIA Andrew a b a k e r AT f l o w l o g i c DOT c o m DOT a u Macro recording will be introduced into Visio 2003 which will be released next month. There examples of VBA code for Visio at http://www.mvps.org/visio/VBA.htm John... Visio MVP Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm Need VBA examples? http://www.mvps.org/vis...

FILL CELLS = VARIABLE # OF OTHER CELLS (WITH MACRO)
COL A has variable number of cells... Want to fill equal number of COL B cells with the number 70... EXAMPLE: If COL A has 8 cells, want only 8 cells of COL B with 70. I don't want CELL 9 thru CELL X to have any values. NEED THE MACRO CODING PLEASE. Manually: enter 70 in cell B1, then double click the little square at the bottom right of the cell. In code (assuming only column A has any values): Sub FillNextToColA() Dim rng As Range Set rng = ActiveSheet.Cells(1, 1).CurrentRegion.Offset(0, 1) rng.Value = 70 End Sub - Jon ------- Jon Peltier, Microsoft Excel MVP Pelti...

creating macro for copying the value from one cell
hi, I m new to macro section. . If i m selecting a2 cell then the value will be captured in a3 cell r anyother cell i want. I want to know the function. plz guide me. Try using the Macro Recorder........the following is a simple one that I recorded to answer this post....... Sub Macro1() ' Macro recorded 2/2/2007 by CRober Range("A2").Select Selection.Copy Range("a3").Select ActiveSheet.Paste End Sub Also, check out this link for help with macros, and post back if you have more questions. http://www.mcgimpsey.com/excel/index.html#usingvba hth Va...

Access USb Printer as User?
Hi, just wondering if a ordinary user account under windows xp sp3 can print using a local attached usb printer...(oki c5510 mfp) it is working as administrator, but the user can't print (as soon as he presses a print button, it fails with "cannot print to device..." any help appreciated. regards joerg I have been able to send output to a usb printer from any account ever since I installed the first one... Jim "Joerg Mayer" <masteryoda@gmx.de> wrote in message news:gfmkkg24bp9q.1em4gra69x3kx.dlg@40tude.net... > Hi, > > just wond...

Slow responce of cash drawer OR printer error
Hi every one. Some time the cash drawer response is very slow. Sometimes the cash drawer opens, but the receipt doesn't print. The computer searches for a while and then at the end it displays an error message. I have TM88IV & APG Cash Drawer, using OPOS driver, using Microsoft RMS 2.0 with Windows Vista. if any body have some idea please help me Thanks in advance I have the same experience but with a SureMark 4610 - TF6 Any ideas? Kyle "Akbar Mian" <AkbarMian@discussions.microsoft.com> wrote in message news:22EF9D16-A753-4FEF-A199-A232F571EFFD@microsoft...

Microsoft Excel Help
Why are they called arguments when creating an Excel function? i need to no for a Excel test! what makes them arguments? Hi if you mean the 'parameteres' of a function how would you call them otherwise :-) -- Regards Frank Kabel Frankfurt, Germany "martz" <anonymous@discussions.microsoft.com> schrieb im Newsbeitrag news:0b2601c4d8e5$c05f7bd0$a301280a@phx.gbl... > Why are they called arguments when creating an Excel > function? i need to no for a Excel test! what makes them > arguments? ...

Need help grouping charts
I have identical charts which occur on multiple sheets. Is there any wa to group them for editing? When I group the sheets themselves, it seems to deactivate the charts I tried doing it with a macro as an alternative and then flipping th sheets one by one and keying the macro, but I get a message box with: "Run-time error 1004", "Unable to get the ChartObjects property of th worksheet class". Does anyone have any ideas -- Izz ----------------------------------------------------------------------- Izzy's Profile: http://www.excelforum.com/member.php?action=getin...

Help with Now()
Hi, I am creating a spreadsheet and I need to have a cell and that record the date and time each row is entered seperately. The problem I have at the moment is whenever I add a new row of data i updates the previous rows time? does any one have any suggestions on how to stop this happening? thank -- sydoll ----------------------------------------------------------------------- sydolly's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2712 View this thread: http://www.excelforum.com/showthread.php?threadid=46697 Now() is a volatile function and will change ev...

Choose stationery
Is it possible to choose other stationeries than the default, when you're writing a special mail? Like the way you choose a template in Word. I am using Outlook 2002. regards / Bengt Actions | New HTML Mail Message Using | More Stationery. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Bengt Carlsson" <bengtc@algonet.se> wrote in message news:kDBEd.13882$d5.116765@newsb.telia.net... > Is it possible to choose other stationerie...

Help with Raw Stock Data Collection
Is it possible to have Excel search through 1 minute raw data and be able to determine if the price moves between a certain boundary for a certain time then it will be classified as "Type 1". And if it is increasing for a certain time then it will be "Type 2" and likewise for when it is decreasing. I want Excel to be able to automatically search through the raw data and determine what is the type of state without myself having to manually pinpoint it on the chart then going back and doing a manual search and calculation in Excel. Only issue is that the exact number determi...

DB Mail is is not working. Need help please.
I have try stop and start the db mail by executing the SPs below but no luck. Does anyone has seem the error below and how to fix it. Thanks in advance for your advise/help. --steps USE msdb; go EXECute sysmail_stop_sp; go EXECute sysmail_start_sp; go EXECute sysmail_help_queue_sp @queue_type = 'Mail'; go queue_type length state last_empty_rowset_time last_activated_time ---------- ----------- ---------------------------------------------------------------- ----------------------- ------------...

Third request for help with Payables Error message!
Ok I have posted this for the third time with no response! I need help to know if there is any kind of issue on the back end of our environment. If someone could help it would be greatly appreciated! We are currently running GP 10 SP1 and apparently since version 8 (we did not upgrade to 9) there has been the following error message while launching a transaction out of Smartlist, when we go to inquiry for AP documents, and drill down of PMTRX & PMCHK from the JE inquiry view: Unhandeled Script Exception: Index 0 array of 'PM_Transaction_Inquiry_Fill' Script terminated We ran a ...

HELP
I just wrote a check to the IRS, and in the Expense Catagory I indicated "Taxes : Federal Income Tax". Yet in the Income/Expense report, this payment is not included in my total federal taxes paid for this month. I should note that the check was written from an Investment Account. If I write the check from my checking account, the amount correctly shows up in the Income/Expense report. Any ideas as to why it works differently, depending on which account I pay the tax from? In microsoft.public.money, Tom wrote: >I just wrote a check to the IRS, and in the Expense Cat...

Setting directory for file save in macro
Hi Thanks to a generous poster I now have a great bit of code to use in a macro for Excel which saves a text file (I'm no VBA programmer so this was really helpful), i.e.: Open "Test.txt" For Output As #1 (rest of code) My problem now is this: The macro saves test.txt to Excel's current active folder, rather than the folder that the current workbook is contained in. For example, if I last saved an Excel workbook to c:\workbooks\, and the workbook that I have open exists in c:\workbooks\workbook1\, when I run the macro it saves the text file in c:\workbooks\. If I ...

Calendar/Dates Help
Hi All, I have an excel spreadsheet that lists every date in the year, with a particular code in the next cell. IE: Monday 3/01/2005 11M 22M 32M Tuesday 4/01/2005 11T 22T 32T Wednes 5/01/2005 11W 22W 32W Thursday 6/01/2005 11H 22H 32H Friday 7/01/2005 11F 22F 32F Saturday 8/01/2005 11S 22S 32S Sunday 9/01/2005 11N 22N 32N Monday 10/01/2005 11M 21M 33M Tuesday 11/01/2005 11T 21T 33T Wednes 12/01/2005 11W 21W 33W Thursday 13/01/2005 11H 21H 33H Friday 14/01/2005 11F 21F 33F What I need is to be able to search by the code eg "33T" and have all the dates listed for ...

Urgent help with CStringArray
Hello, i need to return a CStringArray from a class method, but CStringArray (and CStringList also) doesn't have a copy constructor! I want avoid memory allocation within the metod because I don't want to force the class user to deallocate pointers... this is the piece of code: const CStringArray MyClass::MyMethod() { CStringArray StrArray; for (...) StrArray.Add("something"); return StrArray; // this will generate a missing copy constructor compile error } Thank you, Gaetano Sferra "Gaetano Sferra" <rebusmail@iol.it> wrote in messag...

Choose Profile Message When Sending Report to Mail
We are having a problem with Mail Configuration. We are using GP published through Citrix. We log into the desktop as a particular user, and configure the default Mail Profile using Mail in the Control Panel, which is Outlook. The problem is that whenever we Print a report to Screen, then go Send Mail as text, it pops up with the Choose Mail dialog. After clicking on Options (on the Dialog) you can check "Default Profile" and it sends the email. Yet when we close GP and re-open it, the Choose Profile dialog appears again. Any ideas why this is happening? Regards Konrad Konr...

Bill Pay Help
I just signed up for Bill Pay (I have Money 2005), I'm not sure how to coordinate Bill Pay with my Bills list and my checking account register. It makes a separate Bill Pay register, but won't allow me to merge it with my checking account (as Help suggests). Tech support was completely useless, in fact it seems they're in a hurry to get us off the phone. ...

Just Help Me
Hello All . . . Please answer the questionary in the following URI http://nees.awardspace.com/ Thanks a lot . . . :D Post the question here, and we might. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "CorfuVBProgrammer" <merianosnikos@gmail.com> wrote in message news:1167902152.017496.205590@11g2000cwr.googlegroups.com... > Hello All . . . > > Please answer the questionary in the following URI > > http://nees.awardspace.com/ > > Thanks a lot . . . :D > ...

vlookup help #3
hello, I cant figure out the proper syntax for the attached workbook. Th first 8 options on worksheet two work perfectly ( ie when checked, the appear on worksheet 3) I dont know how to apply the formula of th first 8 options to the rest of the checkboxes. Can someone please help me figure out how to do this? Thanks i advance. Aladdi Attachment filename: start order2.zip Download attachment: http://www.excelforum.com/attachment.php?postid=46674 -- Message posted from http://www.ExcelForum.com Right-click on the sheet tab for the Options worksheet. Select View ...

Need Help
Query: Say i have multiple sheets dated 04/01/10 to 04/30/10, each contain names, say A, B, C, D, etc... but these name does not appear in the same order in each sheet. Now data is in time format in front of A, B, C, D, etc. Eg. in sheet 04/01/10 A1 B1 A 1:00:00 D 1:53:00 C 2:45:00 like this data in other sheet till 04/30/10. Now in a new sheet i want this data to be collated in time format in front of the individual sorted in Alphabetical order. Also it should give me the Sum of the data. Is it possible and how? Thanks in advance for the help!...

Help revising slow code
I am using the following code to remove all the lines in a worksheet that have a zero value in Column H. Because there are thousands of rows in the worksheet, this loop takes forever! Does anyone have any suggestions for doing this more quickly? Thanks! Sub Delete_Row_w0() Dim Firstrow As Long Dim LastRow As Long Dim Lrow As Long Dim CalcMode As Long Dim ViewMode As Long With Application CalcMode = .Calculation .Calculation = xlCalculationManual .ScreenUpdating = False End With With Sheets(1) .Select ...

Autofilter help
Hi all I have 4 columns of data with an auto filter on - all ok I then reduce my selection so I finally only have one row of data - all ok Not ok: Problem: Is there an easy way that I can copy the data in the top row of the filter, to another worksheet page - so if the filter is changed so top line shows new result - still copies over the data in the top row of the filter. Bearing in mind that the top row could be I.E. Originally Row 8 or 108 depending on the selection. Autofilter Line = 1 2 3 4 eg Result of A/F a a a a <== copy the result of this line to dif...

corrupted PST file
Hi, I have Outlook 98, running on XP, on a PII 400Mghz Dell desktop. My PST file is about 1.95GB. It has been running extremely slow, and has had to be restarted a bunch of times in the past 2 weeks. Yesterday, it gave an error that the PST file was corrupted, and that PST file need to have the Inbox Repair Tool run on the file, and then the system restarted. I ran the Inbox Repair Tool on the PST, and it did not work. I am totally unable to use the file, which has all my critical contacts and emails. If someone could help out, I would be MOST grateful.... I pulling my friggin ...