|
-
Jul 27th, 2006, 08:23 PM
#1
Thread Starter
Lively Member
[RESOLVED] Help in calling EXCEL application in VB
hi.
i am able to create an excel document using my program by using this code:
Dim xlObject As Object
Dim xlWB As Workbook
Dim xlSheet As Worksheet
Application.DisplayAlerts = False
Set xlObject = GetObject("", "Excel.Application")
Set xlWB = xlObject.Workbooks.Add
Set xlSheet = xlObject.Application.ActiveWorkbook.Sheets(1)
xlObject.Visible = True
With xlSheet
.Name = "Test"
End With
-- what if i want to call an existing excel document. i tried this code but it unloads on its on.
Dim xlObject As Object
Application.DisplayAlerts = False
Set xlObject = GetObject("C:\Test.xls", "Excel.Template")
Application.Visible = True
--- i want to show the template and edit it... thanks...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|