Sign in to follow this  
Followers 0
Blue_Drache

Something changed and has introduced a hiccup

4 posts in this topic

#1 ·  Posted (edited)

Prior to the 3.2.0.1 release, this code worked fine with the Beta releases:

While 1
    ; Get the DCN from the user
    $dcn = ""
    Do
        $pass = 0
        If WinExists("Microsoft Excel") Then
            $oExcel = ObjGet("", "Excel.Application") ; sets the current Excel window as an object.
            $dcn = $oExcel.ActiveCell.Value ; grab the data from the current active cell.
                                                                    ConsoleWrite('@@ Debug(54) : $dcn = ' & $dcn & @lf & '>Error code: ' & @error & @lf) ;### Debug Console
                                                                    MsgBox(262144,'Debug line ~54','Selection:' & @lf & '$dcn' & @lf & @lf & 'Return:' & @lf & $dcn & @lf & @lf & '@Error:' & @lf & @Error) ;### Debug MSGBOX
            ; mark what's been done

It ran perfectly...did what I wanted, behaved itself and returned the requested data from Excel....

Now...the only value I can get for a $dcn is "23"

:P

????

@@ Debug(54) : $dcn = 23
>Error code: 0

As far as I can tell...there's nothing wrong with my code....I've reviewed the helpfile and matched my structure to those given in the examples.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites



What did you expect as a return value instead of 23?

I know that there was a bug fix done with floating numbers found by Valik and maybe be ok in the latest beta. I cannot see in history to confirm but could be your issue? Differcult to tell with amount of info.

Share this post


Link to post
Share on other sites

Try it in reverse:

$oExcel.ActiveCell.Value = "HERE IS THE ACTIVE CELL"

Does that show up where you expect?

Borksville.

C:\Documents and Settings\U256655\Desktop\AutoIt\User Scripts\RetroDDRPrinter.au3 (55) : ==> The requested action with this object has failed.: 
$oExcel.activecell.text = "TEST TEST TEST" 
$oExcel.activecell.text = "TEST TEST TEST"^ ERROR

It seems that it's not even getting the object in the first place, yet...wait...

*slaps forehead*

I feel dumb.

:P

*walks away and quickly closes the other two windows that were open*

I apologize for wasting y'alls time.

Sheesh...when I close out the other two windows, it works perfectly.

Go figure.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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  
Followers 0