Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good Morning
First time post so if I get it all wrong please allow a little leeway. We have a UserForm that reads a Result Sheet on filling the Text Boxes and clicking a CommandButton it the enters the info on a sheet named Card - we then print the resulting card at the moment we have to do each one individually by selecting a number from 1-100 from a drop down Combo Box is it possible after selecting 1 from the drop down it will then continue to find the next row down and print all the rows on to an individual card. The snippets of code below are I suspect very simple to all you clever people out there but this is we do it at the moment and its very time consuming. Private Sub Add1_Click() Dim varAnswer As String varAnswer = MsgBox("Have you added the Dialog Box Entries to the Sheet?", vbYesNo, "Print Warning") If varAnswer = vbNo Then Exit Sub End If Dim X As Integer X = InputBox("Number Of Copies Required ? Enter In Box Below", "Print") If X 0 Then Sheets("Card").Select ActiveWindow.SelectedSheets.PrintOut Copies:=X, Collate:=True End If End Sub Private Sub Cmb10_Click() Dim startrownum As Integer Dim endrownum As Integer startrownum = 2 endrownum = 102 UserForm1.Tb52.Value = (Sheets("Result").Range("A" & Trim(Str(Cmb10.ListIndex + startrownum)))) UserForm1.Tb53.Value = (Sheets("Result").Range("B" & Trim(Str(Cmb10.ListIndex + startrownum)))) UserForm1.Tb54.Value = (Sheets("Result").Range("C" & Trim(Str(Cmb10.ListIndex + startrownum)))) UserForm1.Tb55.Value = (Sheets("Result").Range("D" & Trim(Str(Cmb10.ListIndex + startrownum)))) UserForm1.Tb56.Value = (Sheets("Result").Range("E" & Trim(Str(Cmb10.ListIndex + startrownum)))) UserForm1.TB57.Value = (Sheets("Result").Range("F" & Trim(Str(Cmb10.ListIndex + startrownum)))) UserForm1.Tb58.Value = (Sheets("Result").Range("G" & Trim(Str(Cmb10.ListIndex + startrownum)))) End Sub Private Sub Add11_Click() Worksheets("Card").Range("I4:P4").Value = UserForm1.Tb56.Value Worksheets("Card").Range("B6:W6").Value = UserForm1.Tb53.Value Worksheets("Card").Range("E10:I10").Value = UserForm1.Tb52.Value Worksheets("Card").Range("H13:P13").Value = UserForm1.Cmb11.Value Worksheets("Card").Range("I15").Value = UserForm1.Tb54.Value Worksheets("Card").Range("M15:O15").Value = UserForm1.Tb55.Value Worksheets("Card").Range("J17:N17").Value = UserForm1.TB57.Value Worksheets("Card").Range("Q11:W11").Value = UserForm1.Tb51.Value Worksheets("Card").Range("J10:M10").Value = UserForm1.Tb58.Value End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 printing problem--printing 1 document on 2 pages | Excel Discussion (Misc queries) | |||
Excel Printing --Borders are not printing on the same page as data | Excel Discussion (Misc queries) | |||
Printing a heading on each new page when printing | Excel Discussion (Misc queries) | |||
Enable Double sided printing contiuously when printing multiple s. | Excel Discussion (Misc queries) | |||
Printing? Worksheets not printing the same on multiple pc's! | Excel Programming |