Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
losing modules, and user forms in VBeditor
Howdie all.
For quite some time now, I've been fidning that I'll import some bas or frm file into my xlam file using the vb editor, and save my changes, ensuring that the specific xlam file is active, and close the excel program out. I then go to open it back up, and find that after getting a failed attempt to use a macro that'd have been stored in the given module, it's not actually in the xlam file any longer. Thus, I'll repeat the process, sometimes two or three attempts before it actually remains there. So, my question..... Is there a means by which I'd be able to retain the frm, and bas files in the xlam, without their getting lost? Both my colleague and I have in fact had this problem for at least 1-1/2 years now, and I for one am tired of having to deal with it. As I'm sure he is as well. Thank you for your inputs. Best. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
losing modules, and user forms in VBeditor
I've also encountered that Save doesn't necessarily do that for addins, and
I have no idea why. Inserting a sub like this in the addin, and running it with the play button in the VBeditor, can be assuring: Sub SaveMe() ThisWorkbook.Save DoEvents MsgBox FileDateTime(ThisWorkbook.FullName), , "Last saved" End Sub HTH. Best wishes Harald "Steve" wrote in message ... Howdie all. For quite some time now, I've been fidning that I'll import some bas or frm file into my xlam file using the vb editor, and save my changes, ensuring that the specific xlam file is active, and close the excel program out. I then go to open it back up, and find that after getting a failed attempt to use a macro that'd have been stored in the given module, it's not actually in the xlam file any longer. Thus, I'll repeat the process, sometimes two or three attempts before it actually remains there. So, my question..... Is there a means by which I'd be able to retain the frm, and bas files in the xlam, without their getting lost? Both my colleague and I have in fact had this problem for at least 1-1/2 years now, and I for one am tired of having to deal with it. As I'm sure he is as well. Thank you for your inputs. Best. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
losing modules, and user forms in VBeditor
Hi Harald,
Now that's an interesting idea. Thank you. My next question, the only thing the message box says is the date, and time, with the "Last Saved" statement. It doesn't actually provide the workbook name, which is what I'd thought the FileDateTime(ThisWorkbook.FullName) command performed. For the first few times, I'd be interested in ensuring that it did indeed save the correct file--- I know, call me paranoid. ;-) Again, thank you. "Harald Staff" wrote: I've also encountered that Save doesn't necessarily do that for addins, and I have no idea why. Inserting a sub like this in the addin, and running it with the play button in the VBeditor, can be assuring: Sub SaveMe() ThisWorkbook.Save DoEvents MsgBox FileDateTime(ThisWorkbook.FullName), , "Last saved" End Sub HTH. Best wishes Harald "Steve" wrote in message ... Howdie all. For quite some time now, I've been fidning that I'll import some bas or frm file into my xlam file using the vb editor, and save my changes, ensuring that the specific xlam file is active, and close the excel program out. I then go to open it back up, and find that after getting a failed attempt to use a macro that'd have been stored in the given module, it's not actually in the xlam file any longer. Thus, I'll repeat the process, sometimes two or three attempts before it actually remains there. So, my question..... Is there a means by which I'd be able to retain the frm, and bas files in the xlam, without their getting lost? Both my colleague and I have in fact had this problem for at least 1-1/2 years now, and I for one am tired of having to deal with it. As I'm sure he is as well. Thank you for your inputs. Best. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
losing modules, and user forms in VBeditor
Ok try
Sub SaveMe() ThisWorkbook.Save DoEvents MsgBox ThisWorkbook.FullName & vbnewline & "last saved " & _ FileDateTime(ThisWorkbook.FullName), , "I promise:" End Sub No reason not to be paranoid if you risk losing hours of great work to a greedy bug. ThisWorkbook is always the file containing the running macro. Best wishes Harald "Steve" wrote in message ... Hi Harald, Now that's an interesting idea. Thank you. My next question, the only thing the message box says is the date, and time, with the "Last Saved" statement. It doesn't actually provide the workbook name, which is what I'd thought the FileDateTime(ThisWorkbook.FullName) command performed. For the first few times, I'd be interested in ensuring that it did indeed save the correct file--- I know, call me paranoid. ;-) Again, thank you. "Harald Staff" wrote: I've also encountered that Save doesn't necessarily do that for addins, and I have no idea why. Inserting a sub like this in the addin, and running it with the play button in the VBeditor, can be assuring: Sub SaveMe() ThisWorkbook.Save DoEvents MsgBox FileDateTime(ThisWorkbook.FullName), , "Last saved" End Sub HTH. Best wishes Harald "Steve" wrote in message ... Howdie all. For quite some time now, I've been fidning that I'll import some bas or frm file into my xlam file using the vb editor, and save my changes, ensuring that the specific xlam file is active, and close the excel program out. I then go to open it back up, and find that after getting a failed attempt to use a macro that'd have been stored in the given module, it's not actually in the xlam file any longer. Thus, I'll repeat the process, sometimes two or three attempts before it actually remains there. So, my question..... Is there a means by which I'd be able to retain the frm, and bas files in the xlam, without their getting lost? Both my colleague and I have in fact had this problem for at least 1-1/2 years now, and I for one am tired of having to deal with it. As I'm sure he is as well. Thank you for your inputs. Best. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
losing modules, and user forms in VBeditor
Perfect....
Thank you. Best. "Harald Staff" wrote: Ok try Sub SaveMe() ThisWorkbook.Save DoEvents MsgBox ThisWorkbook.FullName & vbnewline & "last saved " & _ FileDateTime(ThisWorkbook.FullName), , "I promise:" End Sub No reason not to be paranoid if you risk losing hours of great work to a greedy bug. ThisWorkbook is always the file containing the running macro. Best wishes Harald "Steve" wrote in message ... Hi Harald, Now that's an interesting idea. Thank you. My next question, the only thing the message box says is the date, and time, with the "Last Saved" statement. It doesn't actually provide the workbook name, which is what I'd thought the FileDateTime(ThisWorkbook.FullName) command performed. For the first few times, I'd be interested in ensuring that it did indeed save the correct file--- I know, call me paranoid. ;-) Again, thank you. "Harald Staff" wrote: I've also encountered that Save doesn't necessarily do that for addins, and I have no idea why. Inserting a sub like this in the addin, and running it with the play button in the VBeditor, can be assuring: Sub SaveMe() ThisWorkbook.Save DoEvents MsgBox FileDateTime(ThisWorkbook.FullName), , "Last saved" End Sub HTH. Best wishes Harald "Steve" wrote in message ... Howdie all. For quite some time now, I've been fidning that I'll import some bas or frm file into my xlam file using the vb editor, and save my changes, ensuring that the specific xlam file is active, and close the excel program out. I then go to open it back up, and find that after getting a failed attempt to use a macro that'd have been stored in the given module, it's not actually in the xlam file any longer. Thus, I'll repeat the process, sometimes two or three attempts before it actually remains there. So, my question..... Is there a means by which I'd be able to retain the frm, and bas files in the xlam, without their getting lost? Both my colleague and I have in fact had this problem for at least 1-1/2 years now, and I for one am tired of having to deal with it. As I'm sure he is as well. Thank you for your inputs. Best. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Public, Private, Event modules, Forms modules,,, | Excel Programming | |||
Updating VBA Modules and Forms in User Workbooks | Excel Programming | |||
Forms and Modules | Excel Programming | |||
Modules and Forms II | Excel Programming | |||
Modules and Forms | Excel Programming |