Jump to content

ObjGet($FilePath) <> _ExcelBookOpen($FilePath)


Recommended Posts

Can somebody explain to me why sometimes

local $oExcel = ObjGet($FilePath); Create an Excel Object

    If @error Then
        MsgBox(0, "Excel Error:", "Error creating Excel object!")
        Exit
    EndIf

    If Not IsObj($oExcel) Then
        MsgBox(16, "Excel Error:", "Error creating Excel object!")
        Exit
    EndIf

    $oExcel.Windows (1).Visible = 1; Set the first worksheet in the workbook visible
    $oExcel.Worksheets (1).Activate
    $oExcel.ActiveSheet.Visible = 1
    $oExcel.Application.Visible = 0

is used in the place of

$oExcel = _ExcelBookOpen($FilePath)

thanx

Link to comment
Share on other sites

Can somebody explain to me why sometimes

local $oExcel = ObjGet($FilePath); Create an Excel Object

    If @error Then
        MsgBox(0, "Excel Error:", "Error creating Excel object!")
        Exit
    EndIf

    If Not IsObj($oExcel) Then
        MsgBox(16, "Excel Error:", "Error creating Excel object!")
        Exit
    EndIf

    $oExcel.Windows (1).Visible = 1; Set the first worksheet in the workbook visible
    $oExcel.Worksheets (1).Activate
    $oExcel.ActiveSheet.Visible = 1
    $oExcel.Application.Visible = 0

is used in the place of

$oExcel = _ExcelBookOpen($FilePath)

thanx

The former doesn't use the Excel UDF and where ever you see it might just be a little older code. The later does. Just another way of doing it.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...