Macro Compatibility between 03 and 07

J

jop

Hi,
I have created files in excel 2003 with VBA and Macro's
When user with excel 07 run those macro's the macro is renamed, it get's a
filename and path to the local drive ofm the user.
So the next user can't excute that macro anu longer.
I saw this also happening with add-inn like khalix for excel.

Does anyone know how to prevent this from happening in an other way than to
just forcing everyone to keep files in the same 03 format?

Thanks, Jop
 
B

Barb Reinhardt

I've not seen this problem. How are you calling the macros and what are the
names of the modules and procedures. You may need to post some code.
 
J

Jop

thanks for looking at this.

The Macro is called by a click on a button

It is a very simple recorded Macro:

Sub ExportNewOppsSum()
'
' ExportNewOppsSum Macro
' Macro recorded 4/6/2007 by jochemp
'
'
Sheets("Opps Summary").Visible = True
Sheets("Opps Summary").Select
Sheets("Opps Summary").Copy Before:=Sheets(10)
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Opps Summary").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("Opps Summary (2)").Select
Application.CutCopyMode = False
Sheets("Opps Summary (2)").Move

Range("C2").Select
End Sub

When the Macro has run the name changes to:
Book1!ExportNewOppsSum

And some other macro's that did not run are also renamed and get the Book1! reference too.

Something similar happens when using Khalix for Excel in 07 and 03.
Here is an example from Khalix (an add-inn for excel)

This is how the formula was as I wrote it in 2003
=IF($B103="New Site",0,KFCELL(+$A115,+C$6,+$B103,+$F$1,+$D$1,+$F$2,+$D$2))

This is what it turned in to:
=IF($B103="New Site",0,'C:\Program Files\Khalix\KLXPROD\software\khalix.xla'!KFCELL(+$A115,+C$6,+$B103,+$F$1,+$D$1,+$F$2,+$D$2))


hope this sheds some lite

tx, Jop




Barb Reinhardt wrote:

I have not seen this problem.
04-Mar-10

I have not seen this problem. How are you calling the macros and what are the
names of the modules and procedures. You may need to post some code.
--
HTH,

Barb Reinhardt



:

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
What's New for Developers in SharePoint 2010 Object Model?
http://www.eggheadcafe.com/tutorial...d8-3e2773fa29b5/whats-new-for-developers.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top