Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default 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
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
Public, Private, Event modules, Forms modules,,, Jim May Excel Programming 11 October 31st 05 03:12 AM
Updating VBA Modules and Forms in User Workbooks Joe 90[_2_] Excel Programming 0 April 28th 04 10:23 PM
Forms and Modules scrabtree23[_2_] Excel Programming 4 November 11th 03 03:57 PM
Modules and Forms II Pedro Excel Programming 1 November 7th 03 11:19 AM
Modules and Forms Pedro Excel Programming 2 November 6th 03 02:02 PM


All times are GMT +1. The time now is 11:20 AM.

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

About Us

"It's about Microsoft Excel"