run time error 1004 only on web run
The only way the line below will give a 1004 error if the code cannot find
the worksheet "Input Sheet". It doesn't matter how the name of the sheet is
capatilized. The problem is probably due to the fact that you have more than
one workbook opend and the code is looking at the wrong workbook.
Make sure you give a name to each workbook. the workbook the code is
running you can use ThisWorkBook. Name each workbook as you open the
workbooks and then make sure you include the workbook name in every
reference. do the same type thing with each worksheet.
set newbk = workbooks.open filename:= "abc.xls"
with newbk
.Sheets("Sheet1").Range("A1").copy _
.Sheets("Sheet1").Range("B2")
end with
NewRow = Worksheets("INPUT SHEET").Range("B3").Value + 1
"willfeld" wrote:
trying to utilize a workbook on the web works fine on the computer, once i
test it in the browser i get a 1004 run time error
Dim NewRow As Integer
on the following line
NewRow = Worksheets("INPUT SHEET").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
--
Bucky F
|