I was able to open a workbook and put text in to the newly opened workbook but I'm not sure why I can't put a formula in to it. It puts the formula in to the workbook with the macro. It was working but I must have something missing because it always comes up file does not exist. I'm sure it's easy to somebody.
Sub gogetit()
Dim sfile As String
sfile = InputBox("File Name", "File Name Entry"
On Error GoTo errexit
Workbooks.Open Filename:="H:\sfile.xls"
Worksheets("Sheet1"
.Range("A1"
.Formula = "=$A$4+$A$10"
GoTo line10
errexit:
Err.Clear
MsgBox "File does not exist", , "File Not Found"
line10:
End Sub
I may not be very smart but I'm sure wirey!!!!
Sub gogetit()
Dim sfile As String
sfile = InputBox("File Name", "File Name Entry"
On Error GoTo errexit
Workbooks.Open Filename:="H:\sfile.xls"
Worksheets("Sheet1"
GoTo line10
errexit:
Err.Clear
MsgBox "File does not exist", , "File Not Found"
line10:
End Sub
I may not be very smart but I'm sure wirey!!!!