Jump to content
Sign in to follow this  
motormad

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

Recommended Posts

motormad

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

Share this post


Link to post
Share on other sites
MrMitchell

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.

Share this post


Link to post
Share on other sites
motormad

Thanx

I better not use it then :-)

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.