Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 2nd, 2007, 5:11 AM   #1
pcfixz
Newbie
 
Join Date: May 2006
Posts: 17
Rep Power: 0 pcfixz is on a distinguished road
Send a message via MSN to pcfixz
Newbie question - Selecting from a choice

Hi,

I am teaching myself vb and am sure this is simple i guess i just need a shove in the right direction.

I am installing a number of network printers which all install fine but what i would like is for a popup box to appear where the user can select the location from say 5 locations.

basically i have say 50 printers in 5 locations. I want to choose the location and then it would install the printers for that location

location a
location b
location c
location d
location e

and then depending on what they selected is would install all the printers from that location?

I am guessing i would some how need to create a variable for each of location?

Below is how i am currently adding the printers but this way i am having to edit the file a lot my suggested way would be that i could add all the printers and then just choose the location

wnet.AddWindowsPrinterConnection "\\server\printername"

Any help you could offer would be greatfully appreicated.

Phil

Last edited by pcfixz; May 2nd, 2007 at 6:01 AM.
pcfixz is offline   Reply With Quote
Old May 2nd, 2007, 5:33 AM   #2
pcfixz
Newbie
 
Join Date: May 2006
Posts: 17
Rep Power: 0 pcfixz is on a distinguished road
Send a message via MSN to pcfixz
sorry this should be in VB script programming could someone move it?
pcfixz is offline   Reply With Quote
Old May 3rd, 2007, 1:42 AM   #3
tAK
Programmer
 
Join Date: Mar 2007
Posts: 33
Rep Power: 0 tAK is on a distinguished road
For starters, create functions for each location, and a particular locations function contains all of the printers to install for that location.

I am not sure about getting multiple question/selection options from a VB script, i have seen .hta (html applications) that request input, and from what i have seen, they are pretty much just vbs.
http://www.microsoft.com/technet/scr...hubs/htas.mspx
tAK is offline   Reply With Quote
Old May 3rd, 2007, 12:42 PM   #4
pcfixz
Newbie
 
Join Date: May 2006
Posts: 17
Rep Power: 0 pcfixz is on a distinguished road
Send a message via MSN to pcfixz
thanks i will check out .hta
pcfixz is offline   Reply With Quote
Old May 3rd, 2007, 1:45 PM   #5
randum77
Programmer
 
randum77's Avatar
 
Join Date: Jun 2006
Location: Fayettehell, NC
Posts: 56
Rep Power: 3 randum77 is on a distinguished road
A quick way you could do it is have a *.vbs for each area. Then on a web page make a link to each one? Just a random off the top. I am sure there would be security prompts in doing this.
__________________
_Marshall_

"America has bred a society that is innocent and incapable of accepting responsibility, but yet, is able to place blame on others without guilt."
randum77 is offline   Reply With Quote
Old May 3rd, 2007, 4:53 PM   #6
pcfixz
Newbie
 
Join Date: May 2006
Posts: 17
Rep Power: 0 pcfixz is on a distinguished road
Send a message via MSN to pcfixz
the hta will work thats fine. Another simple question i have is if i have a variable called printserver how would i call it would the below be correct?

wnet.AddWindowsPrinterConnection printserver("") & ("\xxx")

printerserver is the server name pulled from a listbox and xxx is the printer name
pcfixz is offline   Reply With Quote
Old May 5th, 2007, 3:51 AM   #7
pcfixz
Newbie
 
Join Date: May 2006
Posts: 17
Rep Power: 0 pcfixz is on a distinguished road
Send a message via MSN to pcfixz
Quote:
Originally Posted by pcfixz View Post
the hta will work thats fine. Another simple question i have is if i have a variable called printserver how would i call it would the below be correct?

wnet.AddWindowsPrinterConnection printserver("") & ("\xxx")

printerserver is the server name pulled from a listbox and xxx is the printer name
i fixed the problem in the end

wnet.AddWindowsPrinterConnection (printserver) & "\xxx"
pcfixz is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python area calculator Volkan Python 20 Feb 4th, 2006 9:11 AM
csh suppress output; newbie question jolok Bash / Shell Scripting 6 Apr 19th, 2005 4:16 PM
Newbie question. Sane Python 3 Apr 14th, 2005 3:20 PM
Newbie Question: C++ .EXEs. ian C++ 13 Feb 23rd, 2005 11:45 AM
Simple Writing to Files. Newbie Question kiaran C++ 1 Feb 8th, 2005 3:22 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:41 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC