In Sheet1 I am using a shape with assigned macro to open a form. I have a command button on the form that adds text and format to the form. It works fine when I am on Sheet2, but when I use the shape on Sheet1 to open the form and the button is pressed all the text and format go on Sheet1 instead of Sheet2.
This is probably pretty simple, but I am new to vba and having some trouble figuring it out.
Private Sub cmdAdditional_Click()
Rows("10:10").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("10:10").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("10:10").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A12").Select
ActiveCell.FormulaR1C1 = "Title"
Range("A13").Select
Sheet2.Range("B12").Value = txtTitle.Text
ActiveCell.FormulaR1C1 = "Time"
Range("B13").Select
Sheet2.Range("A14").Value = txtTime.Text & ComboBox4.Value & "-" & txtTime1.Text & ComboBox5.Value
ActiveCell.FormulaR1C1 = "Duration"
Range("C13").Select
Sheet2.Range("B14").Value = txtDuration.Text
ActiveCell.FormulaR1C1 = "Host Name"
Range("D13").Select
Sheet2.Range("C14").Value = txtHost.Text
ActiveCell.FormulaR1C1 = "Num of Participants"
Range("E13").Select
Sheet2.Range("D14").Value = txtParticipants.Text
ActiveCell.FormulaR1C1 = "Vendor's Time"
Range("F13").Select
Sheet2.Range("E14").Value = txtS3Time.Text & ComboBox7.Value & "-" & txtS3Time1.Text & ComboBox6.Value
ActiveCell.FormulaR1C1 = "Duration"
Range("A12").Select
Sheet2.Range("F14").Value = txtS3Duration.Text
Selection.Font.Bold = True
With Selection.Font
.Name = "Arial"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
Bookmarks