Closing BA and forgetting to save Excel worksheet

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
Zapata
Posts: 213
Joined: Thu Jan 21, 2010 11:58 pm

Once again I have closed down BA without first saving a worksheet I was working on, losing a couple of hours work. Does anyone know of an option either in BA or Excel that would prevent me doing this. Cheers.
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

I've tried several methods but BA seems to override anything I do.

I'm sure it's a problem many of us have had in the past.
Maybe BA can give an option of saving before closing down?

Nigel.
James1st
Posts: 318
Joined: Thu Apr 16, 2009 10:28 am

Autosave (under Tools) Excel might be an idea :geek:
Zapata
Posts: 213
Joined: Thu Jan 21, 2010 11:58 pm

James1st wrote:Autosave (under Tools) Excel might be an idea :geek:

Had a go at this but it did not work. Not to worry, will just have to be more careful.
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

I may have a solution.What version of Excel are you using?

Nigel.
Zapata
Posts: 213
Joined: Thu Jan 21, 2010 11:58 pm

I use 2003 as it seems a lot faster than the newer versions.
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

1. No need to open Bet Angel
2. Open your BA workbook
3. Select file, save as, and save as “BA Copy”
4. From the copy, select file/open and re-open BA book
5. Temporarily unhide all columns
6. Select rows 1:60 (should be enough), and columns A:K (Don’t go beyond K)
7. Back to the copy, range A1, paste special, paste link ( button is right in bottom left hand corner)
8. You should see a lot of 0’s appear, these can be hidden (options, view, hide zero values, if I remember), or you can leave as is. Appearance is not paramount here.
9. While we’re still with the copy, I strongly suggest that you fill rows 7 & 8 with a bright red colour, this will distinguish both copies)
10. Save and close the copy
11. With the BA book, press Alt F11 to open the vba editor, and choose “This Workbook” on the left hand side, and copy and paste this in:

Public CurrentAD As String, PrevAD As String, CurrentR As Range, PrevR As Range
Private Sub Workbook_Open()
Sheets("Bet Angel").Range("A1").Select
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Dim ShtName As String
Dim TForm As String
ShtName = ActiveSheet.Name
If ActiveSheet.Name = "Bet Angel" And Target.Column < 12 Then
Exit Sub
End If
On Error GoTo NoBook
CurrentAD = ActiveCell.Address
Set CurrentR = ActiveCell
If PrevAD = "" Then
PrevAD = CurrentAD
Set PrevR = CurrentR
End If

TForm = Range(PrevAD).Formula
Workbooks("BA Copy").Sheets(ShtName).Range(PrevAD) = TForm
PrevAD = CurrentAD
Exit Sub
NoBook:
MsgBox " Please open BA Copy"
End Sub

Close BA book down, re-open and test it out. Anything you enter will be reproduced in the copy.
On the BA sheet, anything from column L onwards and anything on any of the other two sheets.
Don’t forget, as it’s in as a “worksheet selection change” event, anything you do type won’t be copied over until you press enter.
Note: The sheet names in the copy should be the same as the original and also, it doesn’t deal with ranges. i.e If you select a range and copy/paste, only the first cell will be copied.
Not the most elegant of solutions but, if you exit Bet Angel , this will still be there asking if you want to save it, so your original work is not lost.

Nigel
You do not have the required permissions to view the files attached to this post.
Zapata
Posts: 213
Joined: Thu Jan 21, 2010 11:58 pm

Great stuff - tried and tested and its works brilliant.

Any idea if it can be expanded to include controls and vba code as well?
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”