Choosing Specific Printer In Vba

Jun 16, 2007

In my program I want some labels to be printed on printer P661 (black/white) and other labels on printer P656 (color).

Q: is it possible to do this in vba for my code?

The labels are made in Word and printed from within Excel.


Sub PrintNACL_LABEL()
Dim oWord As Object
Dim sPath As String
Dim iCnt As Integer

sPath = ThisWorkbook.Path & Application.PathSeparator & "NACL_LABEL.doc"

iCnt = Val(InputBox("Hoeveel exemplaren?", "NACL_LABEL", 1))

If iCnt >= 1 Then

Set oWord = CreateObject(Class:="Word.Application")

With oWord.Documents.Open(sPath)
.PrintOut Background:=False, Copies:=iCnt
.Close False
End With

oWord.Quit False
End If

Set oWord = Nothing
End Sub

The specific printers in the network are:

Color ---> "\PlantijnP656 op Ne00:"
Black/white ---> "\plantijn2000oldP661 op Ne02:"

View 9 Replies


ADVERTISEMENT

Choosing A Printer

Jun 6, 2007

I want the user to be able to choose a printer but not print at that time.

1. Store the active printer as a variable using application.activeprinter
2. Have a dialog box (the printers available) popup and have them choose one, then store that

3. I know how to do the rest, but I will have the word document print out with the selected printer, then use the application.activeprinter reset to the original one

View 9 Replies View Related

Macro To Go To Specific Sheet Upon Choosing Option

Oct 16, 2007

Im looking to create a macro that goes to a specific sheet on my workbook upon selecting an option. Example being I open the spreadsheet and a list of options come up such as:

BRIAN
JOHN
JAMES
PAUL
STEVEN

Upon selecting one of those names you are transferred to the sheet named "BRIAN", "JOHN", "JAMES" etc etc etc

View 4 Replies View Related

Macro To Print To Specific Printer

Jun 15, 2009

I am trying to swith between different printers to print out sheets within a single workbook. Recording the macro doesn't work very well and the code I found online doesn't work either (error: object doesn't support property).

How can I set this up to be a dynamic printer setting?
Code I tried:

View 2 Replies View Related

Print Sheet2 To Specific Printer

Feb 15, 2008

What code can I write to print Sheet1 and Sheet2 on specific Printer and Sheet 3 to another printer, then all other sheets to another printer.

View 9 Replies View Related

Top Five Choices - Choosing Rooms

Jun 18, 2014

I am trying to assign rooms to tenants. I would like to set up a function that reads a tenant's top 5 choices for a room, and looks up a column to see if the choice has already been selected before moving to the next choice. Then if all 5 choices have already been selected, the cell reads error.

This is how it would look : Excel Pic.jpg

View 3 Replies View Related

Randomly Choosing Between 4 Numbers

Feb 9, 2007

Is there a function in Excel that would randomly select one of the 4 specified numbers?

View 13 Replies View Related

Choosing Cell With Minimum Value

Feb 15, 2009

I am working with a spreadsheet that has quite a few products and each product has a column for each vendor of that product with the price associated with that vendor. So, I have five columns total:

product, vendor 1 price, vendor 2 price, vendor 3 price, vendor 4 price. I want to have a 6th column that will show the preffered vendor, which of course is selected by the lowest price. I have been able to accomplish this by chaining IF statements together, but it is getting VERY cumbersome for more than 2 vendors.

Ideally, I would like to tell Excel to look at the 4 price cells, choose the lowest one, and return a column number, which I can then associate with a vendor.

View 4 Replies View Related

Choosing Worksheet Dependent On Value?

Nov 24, 2011

I'm trying to set up a consolidated spreadsheet with a number of tabs and a master sheet to work on. I want to set up this master so that I can type the sheet name into one box and in the next box it will use the sheetname I've just typed in to then pull the array off that sheet. I'm using this with VLOOKUP but when I try and type A1! in in the array section, it doesn't seem to like it.

View 3 Replies View Related

Choosing Unique Entries

Oct 7, 2006

I'm trying to write an Excel program to calculate golf handicaps. In column A, I have 20 unique dates. In column B, I have corresponding 20 scores. In column C, I'm trying to create a corresponding notational mark, "*", indicating the 10 lowest scores that are also the oldest. However, I'm running into problems as I may have duplicate scores with different dates, i.e. 3/22/06 will have a score of 85 and will be the 10th lowest score, but 4/1/06 also has a score of 85.

View 9 Replies View Related

Choosing Values From One Sheet

Oct 18, 2006

I have attached a sample of what I am trying to do. What I want to do is to be able to go through each day sheet and choose the name and times from the list box's I've created and have it show up on the summary page to match. So if I'm scheduled to work on Wednesday at 9am... I want it to show up on the summary page under Wednesday at 9am that I am working, but If I am not working I want it to be just an X to show up.

View 5 Replies View Related

Vba Dropdownlist Choosing Cell

Mar 25, 2007

I have not located anywhere an answer how to use in vba dropdown list, when you choose a cell it displays in the TextBox the cell right to it? How is it done by using VBA? Here's a picture about what I am trying to accomplish:

View 6 Replies View Related

Choosing The Right Files From The Folder Through Vba

Jul 7, 2007

I would like to get some help on choosing the right files through vba codes. I have the dates in cell a3 and b3 and all my files ends with the date. The user inputs the date and the code should get the data within that date.

I would like to get some thoughts on how to get the value of cell a3 and b3 and open only those files from the folder.

View 8 Replies View Related

Different Output When Choosing From Dropdown Menu?

Dec 23, 2013

I'm looking for a way for excel to output data to a cell dependent on what I choose from a drop down menu.

For example. I have a drop down menu with 3 options. 1,2 and 3. What I want is that if I choose option 2, then in cell A2 (or whatever) would output the value of 2, say "2222". Or if I choose 1, then A2 would output the value of 1, say "12345".

View 6 Replies View Related

How To Open A File By Choosing Its Name From Combobox

Jan 24, 2012

How to open or Print a doc or pdf file from a combobox on a userForm

I have a folder full of doc files. I used a userform on which i put a combobox which contains those files' names and a cmd to open the file.

I managed to copy all the files names to the WorkSheet and listed them in the combobox.

@@@ I need a VBA code to do the following :

1- looking for the file name which matches the one i choose from the combobox
2- if there is a match, show " match" on a lable.
3- when i click the "open" cmd i created on the userform, it opens the file. or even print it and close it
4- prepare for another match.

View 1 Replies View Related

Choosing Cell Content By Date

Oct 24, 2008

I need to choose the content of a cell by the calendar date ( or system date). Before the date, I need the cell blank (or a 0 would be acceptable). On or after the specific date, I need to have a number appear in that cell. For example, what I need is: Before 10/20/2008, cell B5 should be blank. After this date cell B5 should be 8.

View 9 Replies View Related

Choosing A Crack Proof Password

Apr 3, 2009

If I have a very long password would this make unprotecting the sheet harder?

Or do the programs available on the net extract the data from else where - Making it pointless choosing a complicated password?

View 9 Replies View Related

Fill Data Automatically After Choosing Name

Aug 14, 2008

I'm trying to create an invoice with customer list, and the problem now is I'm trying to find a list-dependent data way to input my customer's address.

At the moment, all I can do is a dependent dropdowns from a sorted list (see method here). So it's kinda troublesome in such that my list (of customers) opens up a list for address that has only one option (since there's only one address for each customer).

I hope there's a method out there whereby I can have a list of customers, then select the customer I want, and the address of this particular customer will appear in another cell below automatically (without the need of selecting it in another list).

My address is actually split into three different cells - Address, Building & Postal Code.

View 3 Replies View Related

Search Function - Choosing And Creating Lookup

Jun 13, 2014

I'm currently trying to put together a search function of sort onto an excel document to look for entries of "Y" based on the choices in a drop down list to populate a list of names that have a "Y" next to them. I've searched the net and read up on IF, VLOOKUP and HLOOKUP commands but I can't quite string something together. An example of what I am trying to achieve is below;

Raw Data:
type1type2type3type4room1room2room3room4
AndyYNNNnYNY
BillYYNYYYYY
ChrisnYNYYYYY
DaveYNNNYYYY
EddyYNNNYYYY
FrankYYNYYNNN
GilesYYNYnYNY
HarveynYNNYNYN
IannYNYYYYY
JohnYYNYYYYN
KyleYYNYYYYY

Search drop downs:
Typetype1
Roomroom1

End result (based on the example of Type1 and Room1):
Bill
Dave
Eddy
Frank
John
Kyle

View 7 Replies View Related

Choosing The Date With IF Function Having Other Functions Included

Jun 23, 2009

If we look at Produced date and TO Date in Sheet1. If the TO date is less than the Produced date then the TO date is the date to use. i.e. for May it will Say
Produced:, 22 Jun 2009 "From:","2009-05-01","To:","2009-05-31". So use "From:","2009-05-01","To:","2009-05-31"47 (because TO < Produced use TO )

However in June it might say Produced:, 22 Jun 2009 "From:","2009-06-01","To:","2009-06-30". So use "From:","2009-06-01","To:","2009-06-21" (because TO > Produced use Produced -1 ).I've already have some formulas in place. Look at the attached file, but I don't know how to set up the IF formula or any other.

View 2 Replies View Related

Choosing Between Multiple Access Queries In Excel

Jul 7, 2014

I have an excel sheet with a 'Home' and 'Data' page. I have imported data from an access query into the 'Data' page where I then push a button on the 'Home' page to run a macro on it. I have multiple queries in my database that I would like to be able to switch between in excel to run the macro on. Is this do-able without having to have multiple sheets?

View 1 Replies View Related

Choosing A Textbox For Default Cursor Location

Dec 11, 2005

On my user form, the cursor blinks in the second text box down.

How do I change it to be blinking in the first (top) text box? This is the first box that data will be entered.

Is this an option in the properties box of the textbox?

View 9 Replies View Related

Control For Choosing Data Entry Field

Jan 15, 2008

I want to create a UI form to allow users to upload data. The data will be tabular (1 column per data field, one row per item). There will be more fields than I need, and the fields will not be named, so I need the users to select which column each field is in (with up to 20 fields). What do you think is the best control / combination of controls to use for this.

View 3 Replies View Related

Unhide/Hide Column When Choosing Dropdown List

Oct 5, 2009

Is there a way to have a column unhide one choosing a certain value from a dropdown list (validation)? I want the column to be hidden throughout the worksheet until a specific value is chosen in the list. Once it's chosen then I want it to unhide that column.

View 4 Replies View Related

Generate Outlook Mail By Choosing Content From Combo Box?

Jul 1, 2014

I have created an excel file that generate outlook emails ( using Ron de Bruin VB codes)

I have a one more task to do with that.

I have list of contents in a combo box... those contents are short form of the main contents that i want to be in the mail.

if i select an content from the combo box and click mail macro it should open an mail with brief contents corresponding to the short content i selected in combo box.

View 10 Replies View Related

Choosing Data From Defined Work Source Range

Oct 30, 2008

My problem is in this defined range in "C30,D30,E30, F30 & G30" there is a possibility of more than one entry. If that is the case the entry would be in "C31,D31,E31, F31 & G31" If this is the case I need to pick the later which is "E31, F31 & G31" not

"C30,D30,E30, F30 & G30". How can I do that?

View 8 Replies View Related

Way To Set The Printer's Properties Using VBA

Oct 16, 2007

Is there a way to set the printer's properties using VBA?

Sometimes we set the printer for BEST quality to do photos or brochures. Well if we don't change it back, when we go to print a spreadsheet, it takes forever because it is set on best quality.

So......
I want to be able to set the print properties to normal using VBA.

View 9 Replies View Related

Set VBA For Default Printer

Sep 30, 2008

I need an assistance in setting up a VBA for the default printer in my office. The issue is I want my spreadsheet to be set up to wherever I open the spreadsheet at any computers in the facility. I want the sheet to be printing out directly at the printer in my office only. Is there a way to do this?

View 9 Replies View Related

Selecting A Printer

Jan 12, 2009

I have a form that all the salespeople use. The last thing in the process is to print the completed form to a specific printer. I recorded a macro to get the proper name of the printer but I am finding out that it records differently for each computer. Is there a way around this?

View 9 Replies View Related

Set Printer To Cell Value

Nov 23, 2006

I have a quality form that is produced from data on an Excel log file. I was wondering if it is possible to select a different network printer based upon the value of a certain cell.

I understand how to print using the local machines local printer but our quality department is located at one site and these forms need to be printed at our other locations.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved