Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting qty to print via textbox entry
I've been searching for this, but cannot find it.
Simply, I have a userform to generate label printing. User enters the info, then in textbox4 will give the quantity to print. All I need is the script that will change the Number of Copies based on the entry of Textbox4 when the labels are printed. Much thanks j.o. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting qty to print via textbox entry
I'm not sure what you are wanting to print. I assume a sheet. If it's not a
sheet, I would recommend reading about the PrintOut method in the VBA help section. It would help if you post the code you are using and give specifics of your application. I also assume this code is located in the userform module. Try this line. Hope this helps! If so, let me know, click "YES" below. Sheets("Sheet1").PrintOut Copies:=TextBox1.Value -- Cheers, Ryan "jeff" wrote: I've been searching for this, but cannot find it. Simply, I have a userform to generate label printing. User enters the info, then in textbox4 will give the quantity to print. All I need is the script that will change the Number of Copies based on the entry of Textbox4 when the labels are printed. Much thanks j.o. . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting qty to print via textbox entry
On Mar 2, 10:11*am, Ryan H wrote:
I'm not sure what you are wanting to print. *I assume a sheet. *If it's not a sheet, I would recommend reading about the PrintOut method in the VBA help section. *It would help if you post the code you are using and give specifics of your application. *I also assume this code is located in the userform module. * Try this line. *Hope this helps! *If so, let me know, click "YES" below. Sheets("Sheet1").PrintOut Copies:=TextBox1.Value -- Cheers, Ryan "jeff" wrote: I've been searching for this, but cannot find it. Simply, I have a userform to generate label printing. User enters the info, then in textbox4 will give the quantity to print. All I need is the script that will change the Number of Copies based on the entry of Textbox4 when the labels are printed. Much thanks j.o. .- Hide quoted text - - Show quoted text - This is not the whole sub, but here's what I'm trying to do. I just need the part that inputs how many copies to print. 'Pastes TextBox1 to Building Application.Goto Reference:="Building" Application.Selection.Value = UCase(TextBox1.Text) Cancel = False ActiveCell.Offset(2, 0).Range("A1").Select 'Pastes TextBox2 to Customer Application.Goto Reference:="Customer" Application.Selection.Value = UCase(TextBox2.Text) Cancel = False ActiveCell.Offset(2, 0).Range("A1").Select 'Pastes TextBox3 to Order number Application.Goto Reference:="OrderNumber" Application.Selection.Value = UCase(TextBox3.Text) Cancel = False ActiveCell.Offset(2, 0).Range("A1").Select '********here's where I need help. I'm telling it what printer to print to. All I need is to know how to tell it ********* 'how many labels I want. I tried to put in what I thought might work, but it didn't. 'Need to take value of TextBox 4 to get qty of labels to print Application.ActivePrinter = "\\abtapa1491\P01VAL149107 on Ne04:" ActiveWindow.SelectedSheets.PrintOut Copies:=Val(TextBox4.Value), ActivePrinter:= _ "\\abtapa1491\P01VAL149107 on Ne04:", Collate:=True Unload UserForm1 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting qty to print via textbox entry
This line doesn't work?
ActiveWindow.SelectedSheets.PrintOut Copies:=Val(TextBox4.Value), -- Cheers, Ryan "jeff" wrote: On Mar 2, 10:11 am, Ryan H wrote: I'm not sure what you are wanting to print. I assume a sheet. If it's not a sheet, I would recommend reading about the PrintOut method in the VBA help section. It would help if you post the code you are using and give specifics of your application. I also assume this code is located in the userform module. Try this line. Hope this helps! If so, let me know, click "YES" below. Sheets("Sheet1").PrintOut Copies:=TextBox1.Value -- Cheers, Ryan "jeff" wrote: I've been searching for this, but cannot find it. Simply, I have a userform to generate label printing. User enters the info, then in textbox4 will give the quantity to print. All I need is the script that will change the Number of Copies based on the entry of Textbox4 when the labels are printed. Much thanks j.o. .- Hide quoted text - - Show quoted text - This is not the whole sub, but here's what I'm trying to do. I just need the part that inputs how many copies to print. 'Pastes TextBox1 to Building Application.Goto Reference:="Building" Application.Selection.Value = UCase(TextBox1.Text) Cancel = False ActiveCell.Offset(2, 0).Range("A1").Select 'Pastes TextBox2 to Customer Application.Goto Reference:="Customer" Application.Selection.Value = UCase(TextBox2.Text) Cancel = False ActiveCell.Offset(2, 0).Range("A1").Select 'Pastes TextBox3 to Order number Application.Goto Reference:="OrderNumber" Application.Selection.Value = UCase(TextBox3.Text) Cancel = False ActiveCell.Offset(2, 0).Range("A1").Select '********here's where I need help. I'm telling it what printer to print to. All I need is to know how to tell it ********* 'how many labels I want. I tried to put in what I thought might work, but it didn't. 'Need to take value of TextBox 4 to get qty of labels to print Application.ActivePrinter = "\\abtapa1491\P01VAL149107 on Ne04:" ActiveWindow.SelectedSheets.PrintOut Copies:=Val(TextBox4.Value), ActivePrinter:= _ "\\abtapa1491\P01VAL149107 on Ne04:", Collate:=True Unload UserForm1 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
column of entry for textbox value | Excel Programming | |||
More help with setting print area to last entry in columns A thru AA and last entry in row 7 | Excel Programming | |||
Selecting All Text in TextBox | Excel Programming | |||
Selecting or Entering a Textbox | Excel Programming | |||
Highlighting or Selecting TextBox entry | Excel Programming |