Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default 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
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
column of entry for textbox value robhargreaves Excel Programming 3 July 23rd 05 06:50 PM
More help with setting print area to last entry in columns A thru AA and last entry in row 7 KimberlyC Excel Programming 4 July 5th 05 11:01 PM
Selecting All Text in TextBox DRKML Excel Programming 1 April 12th 05 12:07 PM
Selecting or Entering a Textbox Todd Huttenstine[_2_] Excel Programming 2 January 19th 04 06:09 PM
Highlighting or Selecting TextBox entry Gus Gazepis Excel Programming 3 September 8th 03 12:01 AM


All times are GMT +1. The time now is 12:51 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"