Initialising data when spreadsheet is first connected

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
pooma
Posts: 3
Joined: Mon Oct 17, 2011 1:20 pm

Hi All,

I'd like to capture the value of the countdown timer (in cell F4) when Bet Angel is first connected and stick it in cell K2.

I can use:

Sub Auto_Open()
Range("K2") = Range("F4")
End Sub

...but when Bet Angel opens or connects the Auto_Open functionality does not work.

Does anyone have any idea how that could be done?

Appreciate any help.

Cheers
John
User avatar
EyePeaSea
Posts: 258
Joined: Sun Jun 12, 2011 11:18 am

Hi John,

You're right, Auto_Open doesn't work when launched from BA. If you put the code into the 'ThisWorkbook' object, then it works fine.
Private Sub Workbook_Open()
Range("K2") = Range("F4")
End Sub
The difference is because of the way Excel behaves when it is opened by another program, rather than by a user.

Another example, for anyone without a valid MS Office license... If you opens Excel then you always get the 'Activation Wizard' pop up. But if you run it via a program (eg. BA) then it bypasses that screen and just runs Excel (almost) normally.
pooma
Posts: 3
Joined: Mon Oct 17, 2011 1:20 pm

Thanks very much, PeaEyeSea. That's what I needed.
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”