Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "born2achieve" schreef in bericht ... DEar Friend, i have tried this, but i cooldnot do this please help me to do this please code: Dim eMessage As String Dim xlApp As Excel.Application 'AppActivate("Microsoft Excel") 'xlApp = GetObject(, "Excel.Application") xlApp = CreateObject("Excel.Application") xlApp.Workbooks.OpenXML("C:\sample .xml") ChDir("C:\") xlApp.AlertBeforeOverwriting = False xlApp.DisplayAlerts = False xlApp.ActiveWorkbook.SaveAs(Filename:="C:\sample .xls") xlApp.AlertBeforeOverwriting = True xlApp.DisplayAlerts = True If Not xlApp Is Nothing Then xlApp.Quit() xlApp = Nothing End If You are working with so called 'objects' and you can not assign a value to an object by saying i.e. xlApp = CreateObject("Excel.Application") Instead you should use Set, so for all objects it should be: Dim xlApp As Excel.Application Set xlApp = CreateObject("Excel.Application") ....and in the end also: Set xlApp = Nothing Please try that and let me know what happens. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Counting datas in one range based on datas in another range | Excel Discussion (Misc queries) | |||
import datas from one excel to another | New Users to Excel | |||
How can I get excel datas in mailing labels? | Excel Discussion (Misc queries) | |||
re : Finding the datas and deleting datas which are not found. | Excel Programming | |||
validating datas from an excel | Excel Programming |