ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,226
- Office Version
- 2007
- Platform
- Windows
Morning,
I have the code in use below.
I complete the TextBoxs in the userform
I see a Msg box COMPLETED ALL OK & when i click the OK button i expect it to Unload the userform but it doesnt ??
What it does is reload the userform again
I have the code in use below.
I complete the TextBoxs in the userform
I see a Msg box COMPLETED ALL OK & when i click the OK button i expect it to Unload the userform but it doesnt ??
What it does is reload the userform again
Rich (BB code):
Private Sub SendToWorksheet_Click()
ThisWorkbook.Worksheets("Sheet1").Range("P6") = Me.TextBox1.Text
ThisWorkbook.Worksheets("Sheet1").Range("Q6") = Me.TextBox2.Text
ThisWorkbook.Worksheets("Sheet1").Range("R6") = Me.TextBox3.Text
ThisWorkbook.Worksheets("Sheet1").Range("S6") = Me.TextBox4.Text
ThisWorkbook.Worksheets("Sheet1").Range("T6") = Me.TextBox5.Text
ThisWorkbook.Worksheets("Sheet1").Range("U6") = Me.TextBox6.Text
ThisWorkbook.Worksheets("Sheet1").Range("P7") = Me.TextBox7.Text
ActiveWorkbook.Save
Application.ScreenUpdating = True
MsgBox "COMPLETED ALL OK", vbInformation, "SUCCESSFUL MESSAGE"
Unload Me
Dim Answer As Long
Dim currentShape As Shape
Sheets("Sheet1").Range("P6:U6").Copy Sheets("Sheet1").Range("E6")
Sheets("Sheet1").Range("P7").Copy Sheets("Sheet1").Range("E7")
Sheets("Sheet1").Range("E6:J6").Copy Sheets("PRINT LABELS").Range("U5")
Sheets("Sheet1").Range("E7").Copy Sheets("PRINT LABELS").Range("U6")
Sheets("Sheet1").Range("E6:J6").Copy Sheets("PRINT LABELS").Range("E5")
Sheets("Sheet1").Range("E7").Copy Sheets("PRINT LABELS").Range("E6")
Sheets("PRINT LABELS").Range("E6").Font.Color = vbWhite
Sheets("PRINT LABELS").Range("E6").Borders.LineStyle = xlNone
Sheets("PRINT LABELS").Range("U6").Font.Color = vbWhite
Sheets("PRINT LABELS").Range("U6").Borders.LineStyle = xlNone
Sheets("PRINT LABELS").Activate
ActiveSheet.Range("X1").Select
Sheets("Sheet1").Activate
ActiveSheet.Range("E7").Select
Application.ScreenUpdating = False
With Sheets("PRINT LABELS")
.Range("M1").ClearContents
For Each currentShape In .Shapes
If currentShape.Type = msoPicture Then
currentShape.Delete
End If
Next currentShape
End With
Application.ScreenUpdating = True
ActiveWorkbook.Save
MsgBox "NOW PASTE CODE ONTO WEBSITE", vbInformation, "Sucessful Transfer"
With Sheets("PRINT LABELS")
.Activate
.Range("AE1").Copy
.Range("A1").Select
ActiveWorkbook.FollowHyperlink Address:="http://www.reeves.tv/mini.html"
End With
End Sub