View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Insert string from Pup up box selection

Vacuum Sealed formulated the question :
Garry

That is awesome, thank you.

One last question relating to the ActivePrinter=....

Will your code stop the macro halting on the:

Application.ActivePrinter = "\\SPRN01\WoW HDC on Ne02:"

Is there an alternative command line I can use for section, say something
like:

Application.ActivePrinter = "\\SPRN01\WoW \DefaultPrinter"

As you have commented previously, I should be able to direct the code to the
Default Printer that is setup via MSO..

Thx heaps again

Mick


If THAT printer IS the default OS printer then you shouldn't have to
set ActivePrinter. It's likely that the code is not halting but rather
taking more time to connect to the remote printer. That happens to me
whenever I change to a local PDF printer and then return to my default
printer on the print server, via the Print dialog. VBA takes a bit
longer because it's less efficient than OS code (C++).

So.., if THAT printer IS the default printer when Excel starts up then
using the PrintOut method of the worksheet object will work. (Excel and
all the other MSO apps always establish connection to the OS default
printer at startup) Hovering your moue over the printer icon on the
Standard toolbar should display a tooltip as to what printer Excel is
currently using. If things are what I suspect then the line setting
ActivePrinter isn't necessary and so could be deleted but I suggest
just comment it out so it's there if you need it later on.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc