Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Excel file from vb

Status
Not open for further replies.

WP

Programmer
Nov 30, 1999
463
CH
I need some help.

I have the following:

sFilename = GetXLFile()

On Error Resume Next

Set mXL = GetObject(, "Excel.Application") 'look for a running copy of Excel
If Err.Number <> 0 Then 'If Excel is not running then
Set mXL = CreateObject(&quot;Excel.Application&quot;) 'run it
End If
Err.Clear ' Clear Err object in case error occurred.

On Error GoTo 0

Set mXLWbk = mXL.Workbooks.Open(strFilename)

Problem is I need to have the file open in edit mode and not just in the background. Bill Paton
william.paton@ubsw.com

Check out
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top