Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Saving/updating an Excel(xlam) add-in

78 views
Skip to first unread message

metricsi...@gmail.com

unread,
Jun 10, 2014, 4:14:42 AM6/10/14
to
Hello,

I have an Excel(xlam) add-in that I want to update, which I do from VBA projects

I expect that xlam file will be saved with the update I have done when I save the VBA project

But it seems that it doesn't always happen and the xlam is not updated. The weird think is that I am quite sure that it worked well some time ago

I am certain that I look at the right xlam file

Office 2013 , W7

Any idea?

Avi

Peter T

unread,
Jun 10, 2014, 4:56:33 AM6/10/14
to

<metricsi...@gmail.com> wrote in message
Most likely you are hitting the save button in the VBE thinking your addin
is the activeproject because one of it's modules is visible and apparently
active. However the activeproject is the one that's selected in the project
explorer window, easy to confuse.

To be sure you are saving the right project, in the immediate window do
?thisworkbook.Name 'and hit enter
and if what you think it is then do
thisworkbook.save ' and hit enter

While developing maybe include something like this (in the thisworkbook
module)

Private Sub Workbook_BeforeClose(Cancel As Boolean)
'If gbDebug Then
If Not Me.Saved Then
If MsgBox("Do you want to save " & Me.Name, vbYesNo) = vbYes Then
Me.Save
End If
End If
' End If
End Sub

Regards,
Peter T


metricsi...@gmail.com

unread,
Jun 10, 2014, 5:28:57 AM6/10/14
to
Great solution!!!

Many thanks

GS

unread,
Jun 10, 2014, 1:51:08 PM6/10/14
to
In addition to Peter's reply.., now I *always* hover over the Save
button until the tooltip shows the project name. It's a habit I've
gotten into since the 1st time I got caught in the same scenario after
a lengthy update to one of my projects. Also, using 'Ctrl+S' has been
known to not work all the time.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


Harald Staff

unread,
Jun 12, 2014, 2:01:59 PM6/12/14
to
Hi Avi

I don't trust the save button in the VB editor, so all my addins contain
code like this:

Sub SaveMe()
'cleanup code here, then
DoEvents
ThisWorkbook.Save
DoEvents
MsgBox FileDateTime(ThisWorkbook.FullName)
End Sub

Best wishes Harald


<metricsi...@gmail.com> skrev i melding
news:4c28b888-6f77-49a4...@googlegroups.com...

Gord Dibben

unread,
Jun 12, 2014, 3:54:30 PM6/12/14
to
Hi Harald

You still hanging around<g>

Can always tell us old guys. . . . . .top-posters.

How you doing?

Gord

metricsi...@gmail.com

unread,
Jun 12, 2014, 6:02:31 PM6/12/14
to
I'll definitely adopt this approach! Thanks

Harald Staff

unread,
Jun 13, 2014, 7:22:27 PM6/13/14
to
Top posters indeed, with 56k modems :-) Equals silver hair I guess.
Everything is fine over here. I hope you and yours are good to, Gord!

Best wishes Harald

"Gord Dibben" <phno...@shaw.ca> skrev i melding
news:6s0kp95h52qeet4cj...@4ax.com...

Peter T

unread,
Jun 14, 2014, 6:12:38 AM6/14/14
to
56k? what luxury! Nothing like that when this group started, or maybe just
but certainly not in its compuserve parent time!

Regards,
Peter T


"Harald Staff" <har...@innocent.invalid> wrote in message
news:lng13c$gm$1...@dont-email.me...
0 new messages