Hi,
I`m a beginner in VBA, but I`m trying to make my work more easily.
I have an excel sheet, when changing the number in cell AB1 is pasting different data corresponding with the number inserted in AB1 from another sheet.
I have an user-form inserting minimum and maximum number. Starting from minimum number I want to change in cell AB1 and print 2 copies, until maximum number included. Lets say that I insert 1 as minimum and 10 as maximum, I want value in cell AB1 to changed as 1 and print 2 copies, then 2..,then 3, and so on until 10 which will be printed also, then save and exit.
Here is what I have so far.
Is not to much, but i`m struggling.
Thanks for your help.
I`m a beginner in VBA, but I`m trying to make my work more easily.
I have an excel sheet, when changing the number in cell AB1 is pasting different data corresponding with the number inserted in AB1 from another sheet.
I have an user-form inserting minimum and maximum number. Starting from minimum number I want to change in cell AB1 and print 2 copies, until maximum number included. Lets say that I insert 1 as minimum and 10 as maximum, I want value in cell AB1 to changed as 1 and print 2 copies, then 2..,then 3, and so on until 10 which will be printed also, then save and exit.
Here is what I have so far.
Code:
Private Sub PrintBtn_Click()
End Sub
Private Sub UserForm1_Activate()
TextBox1.SetFocus
End Sub
Private Sub StergeBtn_Click()
Unload Me
UserForm1.Show
End Sub
Private Sub TextBox1_Change()
Sheets("Tiparire Facturi-Chitante").Range("AC1") = TextBox1.Value
End Sub
Private Sub TextBox2_Change()
Sheets("Tiparire Facturi-Chitante").Range("AC2") = TextBox2.Value
End Sub
Thanks for your help.
Last edited: