+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
Coding Thread, Visual Basic - Changing a command with manual text input in Coding and Web Development; Originally Posted by gtg93 I've already created one similar to how you're suggesting for staff: Attachment 25264 I meant something ...
  1. #16

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,708
    Thank Post
    3,244
    Thanked 1,048 Times in 970 Posts
    Rep Power
    364
    Quote Originally Posted by gtg93 View Post
    I've already created one similar to how you're suggesting for staff:
    Attachment 25264
    I meant something similar to but neater than the below

    vb.net-combobox.jpg

    Button 1 would be renamed to Add Printer and the drop down would be pre populated with all the possible printers whether this is all the printers they can add around the school or just printers in the area they are currently at etc ??

    Failing that if they select which printer they want to add you could just get your vba to open an explorer window to the relevant print server and they just double click on the printer they want to install which if setup correctly should push / install the drivers onto the client and add the printer ?

    If its Art Printer on print server FNPART01 then just a unc path to \\FNPART01 .....
    Last edited by mac_shinobi; 25th June 2014 at 04:46 PM.

  2. Thanks to mac_shinobi from:

    gtg93 (26th June 2014)

  3. #17

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,060
    Thank Post
    853
    Thanked 2,674 Times in 2,269 Posts
    Blog Entries
    9
    Rep Power
    768
    Possibly the Automagic version http://visualbasic.ittoolbox.com/gro...inters-2181211 list of print servers plus a little extra code and it is dynamic.
    Last edited by SYNACK; 25th June 2014 at 06:13 PM.

  4. Thanks to SYNACK from:

    gtg93 (26th June 2014)

  5. #18
    gtg93's Avatar
    Join Date
    May 2010
    Posts
    306
    Thank Post
    176
    Thanked 40 Times in 32 Posts
    Rep Power
    15
    Quote Originally Posted by mac_shinobi View Post
    I meant something similar to but neater than the below

    vb.net-combobox.jpg

    Button 1 would be renamed to Add Printer and the drop down would be pre populated with all the possible printers whether this is all the printers they can add around the school or just printers in the area they are currently at etc ??

    Failing that if they select which printer they want to add you could just get your vba to open an explorer window to the relevant print server and they just double click on the printer they want to install which if setup correctly should push / install the drivers onto the client and add the printer ?

    If its Art Printer on print server FNPART01 then just a unc path to \\FNPART01 .....
    I see what you're saying... I've already knocked up the earlier one, so for now will leave it as is, but may come back and have a fiddle around with the drop down boxes at a later stage... Just figuring out what ou can can't do with it... Thanks for suggestions though


    Quote Originally Posted by SYNACK View Post
    Possibly the Automagic version How to get List of Shared Printers - Toolbox for IT Groups list of print servers plus a little extra code and it is dynamic.
    I'll have a look at this too - thanks.

  6. Thanks to gtg93 from:

    mac_shinobi (26th June 2014)

  7. #19

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,708
    Thank Post
    3,244
    Thanked 1,048 Times in 970 Posts
    Rep Power
    364
    Not sure if this is correct but maybe create a function that you can pass parameters to so as to add the printer(s) depending on the value the user selects from the drop down

    PrintServerOne

    Printer_One
    Printer_Two
    Printer_Three

    PrintServerTwo

    Printer_Four
    Printer_Five
    Printer_Six

    Dim strSvrName As String

    Function InstallPrinter(byval strServer, byVal strShareName)

    'Code to install / add the printer depending on selection made

    End Function

    Maybe use a select case so if they select printers that are on one print server it will know that they are on this print server versus if they select another printer which is on a different print server so something along the lines of

    Select Case cboSelection.Value

    Case 1 or 2 or 3:

    strSvrName = "PrintServer_One"

    InstallPrinter(strSvrName, cboSelection.Value)

    Case 4 or 5 or 6:

    strSvrName = "PrintServer_Two"

    InstallPrinter(strSvrName, cboSelection.Value)

    Case Else:

    MsgBox "Error message or wrong selection made etc"

    End Select

    With the 2nd parameter you may have to do a bit more to translate the selected item into the actual printer share name before you can call the function ??

    I suppose it depends on how you are installing the printers on there machines though as to how you would get it to add or install the printer
    Last edited by mac_shinobi; 26th June 2014 at 09:23 AM.

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Visual basic 6
    By Halfmad in forum Windows
    Replies: 9
    Last Post: 11th June 2007, 02:57 PM
  2. visual basic 2005 beta 2 tutorials ?
    By mac_shinobi in forum Coding
    Replies: 4
    Last Post: 14th December 2006, 09:43 PM
  3. Visual Basic 2005 Express
    By Mintsoft in forum Windows
    Replies: 2
    Last Post: 9th June 2006, 08:21 AM
  4. LDAP & Visual basic 2005 ??
    By mac_shinobi in forum Coding
    Replies: 9
    Last Post: 10th January 2006, 10:13 PM
  5. Best manuals for Visual Basic .NET?
    By kingswood in forum Coding
    Replies: 6
    Last Post: 3rd October 2005, 10:41 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •