browser gives run time 1004 error
This was a thread yesterday. i have tried everything i can on google and
elsewhere to fix this. I have a workbook with a user form that enters to a table sheet. there is a command button that activates all. the code sends back a run time 1004 Method worksheet_ global error only when i place the book in the explorer to see if all works before uploading. by itself it works fine. is this a code issue or browser issue? Private Sub fconfirm_Click() Dim C As Control Dim NewRow As Integer STOPS ON THIS LINE NewRow = Worksheets("input").Range("B3").Value + 1 If Len(MyForm.fregion.Value) = 0 Then MsgBox "The Region field can not be left Blank!", vbOKOnly, "IPA Training - Input Form" MyForm.fregion.SetFocus Exit Sub End If Worksheets("Table").Cells(NewRow, 1).Value = MyForm.fregion.Value Worksheets("Table").Cells(NewRow, 2).Value = MyForm.ftrainer.Value Worksheets("Table").Cells(NewRow, 3).Value = MyForm.ftrainee.Value Worksheets("Table").Cells(NewRow, 4).Value = MyForm.fstriation.Value Worksheets("Table").Cells(NewRow, 5).Value = MyForm.AxDate1.Date Worksheets("Table").Cells(NewRow, 6).Value = MyForm.fappts.Value Worksheets("Table").Cells(NewRow, 7).Value = MyForm.fconfirmedleads.Value Worksheets("Table").Cells(NewRow, 8).Value = MyForm.fcontacts.Value Worksheets("Table").Cells(NewRow, 9).Value = MyForm.fpresentations.Value Worksheets("Table").Cells(NewRow, 10).Value = MyForm.ftalkbc.Value Worksheets("Table").Cells(NewRow, 11).Value = MyForm.ftalkzone.Value Worksheets("Table").Cells(NewRow, 12).Value = MyForm.ffieldsales.Value Worksheets("Table").Cells(NewRow, 13).Value = MyForm.fhybrids.Value Worksheets("Table").Cells(NewRow, 15).Value = MyForm.fapptafter.Value Worksheets("Table").Cells(NewRow, 16).Value = MyForm.fconfirmedafter.Value Worksheets("Table").Cells(NewRow, 17).Value = MyForm.fcontactsafter.Value Worksheets("Table").Cells(NewRow, 18).Value = MyForm.fpresentationsafter.Value Worksheets("Table").Cells(NewRow, 19).Value = MyForm.ftalkbcafter.Value Worksheets("Table").Cells(NewRow, 20).Value = MyForm.ftalkzoneafter.Value Worksheets("Table").Cells(NewRow, 21).Value = MyForm.ffieldsalesafter.Value Worksheets("Table").Cells(NewRow, 22).Value = MyForm.fhybridsafter.Value For Each C In MyForm.Controls If TypeOf C Is MSForms.ComboBox Then C.ListIndex = -1 ElseIf TypeOf C Is MSForms.TextBox Then C.Text = "" End If Next MyForm.Hide End Sub -- Bucky F |
All times are GMT +1. The time now is 12:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com