Hi,
I have the following code:
This code works fine as a stand alone on my desktop, but the spreadsheet this code runs in is opened from a link located in a web page via IE. When I open the file from the link in IE, I get the following error:
Method 'cells' of object_ Global failed.
Any suggestions? Thanks.
I have the following code:
Code:
Sub Update()
Dim lab, adate, atime, dum1, dum2 As String
Dim temp, RH As Double
yr = Year(Now)
mo = Month(Now)
dy = Day(Now)
Root = "\\staticbck-ws\labenviro"
Path = Root & "\" & yr & "\" & mo & "\" & dy & "\" & "FCG Lab.dat"
Open Path For Input As #1
Do While Not EOF(1)
Input #1, aline
adate = Trim(Mid(aline, 17, 15))
atime = Trim(Mid(aline, 33, 15))
temp = Val(Trim(Mid(aline, 49, 7)))
RH = Val(Trim(Mid(aline, 65, 7)))
Loop
Close #1
Cells(1, 17) = adate & " " & atime
Cells(2, 17) = temp & " F, " & RH & " RH "
End Sub
Method 'cells' of object_ Global failed.
Any suggestions? Thanks.