LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Backup Addin

Greetings !

I have this little routine in my AddIn, to save it on exit - Gord Dibben may
recognise this (for which, thanks again)

But as well as saving the AddIn, I would like to save a copy of it. But
this doesn't work....
-----------------
Private Sub Workbook_BeforeClose(Cancel As Boolean)

Dim Msg, Ans, myDate, MyNew

With ActiveWorkbook
Msg = "Do You Want Save Changes to " _
& Me.Name & "?"
Ans = MsgBox(Msg, vbQuestion + vbYesNoCancel)
Select Case Ans
Case vbYes
Me.Save
myDate = Mid(Me.UserStatus(1, 2), 7, 4) _
& Mid(Me.UserStatus(1, 2), 4, 2) _
& Mid(Me.UserStatus(1, 2), 1, 2) _
& Mid(Me.UserStatus(1, 2), 12, 2) _
& Mid(Me.UserStatus(1, 2), 15, 2)
MyNew = Left(Me.Name, Len(Me.Name) - 4) _
& " " & myDate _
& ".xla"
FileCopy Me.Name = MyNew '<-------- doesn't work !
Case vbNo
Me.Saved = True
Case vbCancel
Cancel = True
Exit Sub
End Select
End With
End Sub
-----------------

Regards

Robin
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB6 Com Addin versus VBA Addin meldrum_scotland Excel Programming 1 August 23rd 08 08:09 PM
setup project for Excel addin, won't register addin Gerry Excel Programming 0 October 31st 07 12:01 AM
Removing an Addin from the Tools Addin list. Trefor Excel Programming 2 August 25th 06 04:45 PM
Unshimmed Automation Addin and Shimmed COM Addin in same App Domai Brandon Excel Programming 0 June 27th 06 11:18 PM
Remove Excel AddIn from AddIn List !! Help carl Excel Programming 2 December 8th 03 03:36 PM


All times are GMT +1. The time now is 01:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"