Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Saving/updating an Excel(xlam) add-in

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Saving/updating an Excel(xlam) add-in


wrote in message
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


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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Saving/updating an Excel(xlam) add-in

On Tuesday, June 10, 2014 11:56:33 AM UTC+3, Peter T wrote:
wrote in message

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




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


Great solution!!!

Many thanks
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Saving/updating an Excel(xlam) add-in

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


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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Saving/updating an Excel(xlam) add-in

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


skrev i melding
...
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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 621
Default Saving/updating an Excel(xlam) add-in

Hi Harald

You still hanging around<g

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

How you doing?

Gord

On Thu, 12 Jun 2014 20:01:59 +0200, "Harald Staff"
wrote:

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


skrev i melding
...
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


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Saving/updating an Excel(xlam) add-in

On Thursday, June 12, 2014 9:01:59 PM UTC+3, Harald Staff wrote:
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





skrev i melding

...

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


I'll definitely adopt this approach! Thanks
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Saving/updating an Excel(xlam) add-in

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" skrev i melding
...
Hi Harald

You still hanging around<g

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

How you doing?

Gord



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Saving/updating an Excel(xlam) add-in

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" wrote in message
...
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" skrev i melding
...
Hi Harald

You still hanging around<g

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

How you doing?

Gord





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
Custom XLAM tab not showing up when excel is opened from word chris seiter Excel Programming 0 March 9th 10 02:46 PM
Problem with ATPVBAEN.XLAM in Excel 2007 G.R. Toro Excel Programming 0 February 6th 10 01:58 AM
send mail with closing/saving of excel/xlam Steve Excel Programming 3 April 23rd 09 03:20 AM
Custom Excel 2007 Tab disappears when editing an XLAM add-in file JeffreyW Excel Programming 10 April 8th 09 12:32 AM
Crashing Bug in Solver.XLAM for Excel 2007??? Michael[_40_] Excel Programming 5 December 7th 07 11:01 PM


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

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"