Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Spawn Add Printer Wizard from Hyperlink

Hi,

I use a printer spreadsheet to track all of the printers we're currently
using on site (about 40 of them). Every time I image a new machine I use a
checklist that includes a hyperlink to open up my printer spreadsheet so that
I can see which printer is appropriate to the user I'm prepping a machine for.

I want to create a hyperlink in the printer spreadsheet that will spawn the
Add Printer wizard, to save me a few mouse clicks/keystrokes - if it's
possible. I found information about spawning the wizard on a couple of web
sites, so my hyperlink currently looks like this:
c:\windows\system32\RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL AddPrinter

"RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL AddPrinter" is apparently
the string you can use to spawn the Add Printer wizard and it works if you
paste it directly into the Run dialog box. But when I click my hyperlink in
the spreadsheet I get the following error:
"Cannot open the specified file"

If I don't prefix the command string that spawns the wizard with
"C:\windows\system32" then the hyperlink automatically causes Excel to look
for RUNDLL32.EXE in the directory where the spreadsheet is stored.

Any help much appreciated.

Cheers,
Ben.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Spawn Add Printer Wizard from Hyperlink

Ben,
Unless there's a better way, try:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Shell "RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL AddPrinter"
End Sub

NickHK

"Ben Johnson" <Ben wrote in message
...
Hi,

I use a printer spreadsheet to track all of the printers we're currently
using on site (about 40 of them). Every time I image a new machine I use

a
checklist that includes a hyperlink to open up my printer spreadsheet so

that
I can see which printer is appropriate to the user I'm prepping a machine

for.

I want to create a hyperlink in the printer spreadsheet that will spawn

the
Add Printer wizard, to save me a few mouse clicks/keystrokes - if it's
possible. I found information about spawning the wizard on a couple of

web
sites, so my hyperlink currently looks like this:
c:\windows\system32\RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL

AddPrinter

"RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL AddPrinter" is apparently
the string you can use to spawn the Add Printer wizard and it works if you
paste it directly into the Run dialog box. But when I click my hyperlink

in
the spreadsheet I get the following error:
"Cannot open the specified file"

If I don't prefix the command string that spawns the wizard with
"C:\windows\system32" then the hyperlink automatically causes Excel to

look
for RUNDLL32.EXE in the directory where the spreadsheet is stored.

Any help much appreciated.

Cheers,
Ben.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Spawn Add Printer Wizard from Hyperlink

Hi Nick,

Thanks for the suggestion. Unfortunately, programming Excel isn't my forte
and I'm not sure how to implement what you've suggested.

I've copied and pasted the Private Sub from below into the worksheet object
in the VBA window, but I'm not sure what to do to point the Hyperlink to the
code. In Word I just made a MacroButton, but I can't see an equivalent in
Excel.

Cheers,
Ben.

"NickHK" wrote:

Ben,
Unless there's a better way, try:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Shell "RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL AddPrinter"
End Sub

NickHK

"Ben Johnson" <Ben wrote in message
...
Hi,

I use a printer spreadsheet to track all of the printers we're currently
using on site (about 40 of them). Every time I image a new machine I use

a
checklist that includes a hyperlink to open up my printer spreadsheet so

that
I can see which printer is appropriate to the user I'm prepping a machine

for.

I want to create a hyperlink in the printer spreadsheet that will spawn

the
Add Printer wizard, to save me a few mouse clicks/keystrokes - if it's
possible. I found information about spawning the wizard on a couple of

web
sites, so my hyperlink currently looks like this:
c:\windows\system32\RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL

AddPrinter

"RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL AddPrinter" is apparently
the string you can use to spawn the Add Printer wizard and it works if you
paste it directly into the Run dialog box. But when I click my hyperlink

in
the spreadsheet I get the following error:
"Cannot open the specified file"

If I don't prefix the command string that spawns the wizard with
"C:\windows\system32" then the hyperlink automatically causes Excel to

look
for RUNDLL32.EXE in the directory where the spreadsheet is stored.

Any help much appreciated.

Cheers,
Ben.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Spawn Add Printer Wizard from Hyperlink

Ben,
You said you wanted a hyper link.
If not just add a button from Control Toolbox and add the code.

If you want a hyperlink, its address can be the active workbook

NickHK

"Ben Johnson" wrote in message
...
Hi Nick,

Thanks for the suggestion. Unfortunately, programming Excel isn't my

forte
and I'm not sure how to implement what you've suggested.

I've copied and pasted the Private Sub from below into the worksheet

object
in the VBA window, but I'm not sure what to do to point the Hyperlink to

the
code. In Word I just made a MacroButton, but I can't see an equivalent in
Excel.

Cheers,
Ben.

"NickHK" wrote:

Ben,
Unless there's a better way, try:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Shell "RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL AddPrinter"
End Sub

NickHK

"Ben Johnson" <Ben wrote in message
...
Hi,

I use a printer spreadsheet to track all of the printers we're

currently
using on site (about 40 of them). Every time I image a new machine I

use
a
checklist that includes a hyperlink to open up my printer spreadsheet

so
that
I can see which printer is appropriate to the user I'm prepping a

machine
for.

I want to create a hyperlink in the printer spreadsheet that will

spawn
the
Add Printer wizard, to save me a few mouse clicks/keystrokes - if it's
possible. I found information about spawning the wizard on a couple

of
web
sites, so my hyperlink currently looks like this:
c:\windows\system32\RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL

AddPrinter

"RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL AddPrinter" is

apparently
the string you can use to spawn the Add Printer wizard and it works if

you
paste it directly into the Run dialog box. But when I click my

hyperlink
in
the spreadsheet I get the following error:
"Cannot open the specified file"

If I don't prefix the command string that spawns the wizard with
"C:\windows\system32" then the hyperlink automatically causes Excel to

look
for RUNDLL32.EXE in the directory where the spreadsheet is stored.

Any help much appreciated.

Cheers,
Ben.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Spawn Add Printer Wizard from Hyperlink

Thanks Nick, that worked a treat. Much appreciated.



"NickHK" wrote:

Ben,
You said you wanted a hyper link.
If not just add a button from Control Toolbox and add the code.

If you want a hyperlink, its address can be the active workbook

NickHK

"Ben Johnson" wrote in message
...
Hi Nick,

Thanks for the suggestion. Unfortunately, programming Excel isn't my

forte
and I'm not sure how to implement what you've suggested.

I've copied and pasted the Private Sub from below into the worksheet

object
in the VBA window, but I'm not sure what to do to point the Hyperlink to

the
code. In Word I just made a MacroButton, but I can't see an equivalent in
Excel.

Cheers,
Ben.

"NickHK" wrote:

Ben,
Unless there's a better way, try:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Shell "RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL AddPrinter"
End Sub

NickHK

"Ben Johnson" <Ben wrote in message
...
Hi,

I use a printer spreadsheet to track all of the printers we're

currently
using on site (about 40 of them). Every time I image a new machine I

use
a
checklist that includes a hyperlink to open up my printer spreadsheet

so
that
I can see which printer is appropriate to the user I'm prepping a

machine
for.

I want to create a hyperlink in the printer spreadsheet that will

spawn
the
Add Printer wizard, to save me a few mouse clicks/keystrokes - if it's
possible. I found information about spawning the wizard on a couple

of
web
sites, so my hyperlink currently looks like this:
c:\windows\system32\RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL
AddPrinter

"RunDLL32.EXE SHELL32.DLL,SHHelpShortcuts_RunDLL AddPrinter" is

apparently
the string you can use to spawn the Add Printer wizard and it works if

you
paste it directly into the Run dialog box. But when I click my

hyperlink
in
the spreadsheet I get the following error:
"Cannot open the specified file"

If I don't prefix the command string that spawns the wizard with
"C:\windows\system32" then the hyperlink automatically causes Excel to
look
for RUNDLL32.EXE in the directory where the spreadsheet is stored.

Any help much appreciated.

Cheers,
Ben.






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
members on my network printer not able to print to default printer smeheut Excel Discussion (Misc queries) 0 June 18th 07 06:42 PM
Printer Multiple Worksheets with a particular Printer Setting PP[_2_] Excel Worksheet Functions 0 March 14th 07 02:02 PM
Allow the use of the fx wizard within the fx wizard for nesting Ron Excel Worksheet Functions 1 October 2nd 05 08:58 PM
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM
reading html when hyperlink address not hyperlink text diplayed Kevin Excel Programming 1 December 4th 03 10:13 PM


All times are GMT +1. The time now is 04:10 AM.

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"