Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Macro not working on other peoples computers

Hi I have a macro that prints to one specific printer on the network so one
person can file all the quotes people enter. Other computers but not mine,
mine is the emailpc. All computers have the printer driver. Its a peer to
peer network. I think it has something to do with the Ne09 what does that
mean? Would anyone be able to tell me what I have to change to make it work
on all computers?

The code is:

Application.ActivePrinter = "\\EMAILPC\HP LaserJet 2100
Series PS on Ne09:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Macro not working on other peoples computers

On one of the troublesome pcs, try changing the printer manually--just to see
what it is. You could even record a macro when you do it in excel.

If the only difference is the number in the Ne## string, maybe you could use
something like:

Option Explicit
Sub testme()
Dim iCtr As Long
Dim FoundIt As Boolean
Dim CurPrinter As String

CurPrinter = Application.ActivePrinter

FoundIt = False
For iCtr = 0 To 99
On Error Resume Next
Application.ActivePrinter = "\\EMAILPC\HP LaserJet 2100 Series PS on Ne" _
& Format(iCtr, "00") & ":"
If Err.Number = 0 Then
FoundIt = True
Exit For
Else
'keep looking
Err.Clear
End If
Next iCtr
On Error GoTo 0

If FoundIt = False Then
MsgBox "No printer close to that name"
Else
'do the real work
'and change it back
Application.ActivePrinter = CurPrinter
End If
End Sub



======
You may want to save what was the current printer before you change, too. Then
change back to that when you're done.



JonathanW wrote:

Hi I have a macro that prints to one specific printer on the network so one
person can file all the quotes people enter. Other computers but not mine,
mine is the emailpc. All computers have the printer driver. Its a peer to
peer network. I think it has something to do with the Ne09 what does that
mean? Would anyone be able to tell me what I have to change to make it work
on all computers?

The code is:

Application.ActivePrinter = "\\EMAILPC\HP LaserJet 2100
Series PS on Ne09:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True


--

Dave Peterson
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
macro not working dpolston Excel Discussion (Misc queries) 2 April 19th 07 09:16 PM
How can I change a list of phone numbers into peoples names John New Users to Excel 2 August 29th 06 12:46 PM
Working from 2 computers famdamly Excel Discussion (Misc queries) 8 February 25th 06 11:23 PM
Macro works differently on different computers, same version of Ex oscardwilde Excel Discussion (Misc queries) 6 December 28th 05 11:22 PM
Working with templates on different computers Don Excel Worksheet Functions 2 February 14th 05 02:52 AM


All times are GMT +1. The time now is 12:43 PM.

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

About Us

"It's about Microsoft Excel"