converting excel 2003 to 2007 file formats

X

XX23

I have macros created in excel 2003 (*.xla) as an add-in and wanted to
upgrade them to excel 2007. Also, there is an excel template (*.xlt) that
works in conjunction with these macros.

First, I open the files and save as 2007 file formats and trying to get them
work. But, it is not working. What should I do?

Any suggestions would be greatly appreciated.
 
G

Gord Dibben

Save the add-in(*.xla) as a 2007 add-in *.xlam if you wish but not really
necessary.

Don't know what you mean by a "template that works in conjunction with these
macros"


Gord Dibben MS Excel MVP
 
X

XX23

Yes, it is not working.

First, the add-in file (.xla) have linked to the 2007 ribbon interface and
saved as macro-enabled add-in file (.xlam). Now, the problem is with .xlt
(template file). I open the .xlt file (2003) and save it as .xltx in the
same directory on 2007 (where I used to keep that file in excel 2003 i.e.,
c\program files\microsoft\templates\other documents).

So, when I use the macros (it is several steps) before giving a name for the
new worksheet and complete the task. This is where the problem comes and
gives an error says that Template not found to complete this macro. It works
fine when I leave it as .xlt and saves in the above mentioned folder. It
does not work when save as .xltx or .xltm. I have been trying for days. Any
suggestions would be greatly appreciated.


XX23
 
B

Bob I

See Gords reply about the xla file!
Yes, it is not working.

First, the add-in file (.xla) have linked to the 2007 ribbon interface and
saved as macro-enabled add-in file (.xlam). Now, the problem is with .xlt
(template file). I open the .xlt file (2003) and save it as .xltx in the
same directory on 2007 (where I used to keep that file in excel 2003 i.e.,
c\program files\microsoft\templates\other documents).

So, when I use the macros (it is several steps) before giving a name for the
new worksheet and complete the task. This is where the problem comes and
gives an error says that Template not found to complete this macro. It works
fine when I leave it as .xlt and saves in the above mentioned folder. It
does not work when save as .xltx or .xltm. I have been trying for days. Any
suggestions would be greatly appreciated.


XX23





:
 
X

XX23

Yes, this template (.xlt) works in conjunction with macro file (add-in) and
was told to save it under c:\programs files\microsoft office\templates\other
documents on excel 2003 and worked fine. On 2007, the problem now is when
this file is saved as .xltx and saved in the same directory and gets the
message as: The macro could not find the template to give a name to the
worksheet. It works ok if I leave the template file as .xlt in the same
directory on 2007. The problem is with .xltx file.
I can not figure out how to solve this problem.

We are doing this because the macros needed to upgrade to 2007 file formats
and sooner our machines will upgrade to 2007. Any solutions.
 
G

Gord Dibben

What is the name of the template? Have you changed that in 2007 version?

Having no idea what your macro(s) do in conjunction with your template
leaves little room for trouble-shooting.

Do you have a hard-coded reference to template.xlt in your macro(s)?


Gord
 
X

XX23

Yes, I saved the template file from fsform.xlt to fsform.xltx (2007) and
changed the fsform2006.xla to fsform2007.xlam (add-in file) and this add-in
file has a series of buttons that run macros, which I use to create and edit
financial statements.

I am not a VB programmer and just doing testing those to work. Yes, in the
VB code, there is a place it says "Financials could not find the Template"
and I checked the template file and it is not showing anywhere in the code.
Why it does not let me save the worksheet and gives me error message "FS
could not find the template". Also, I checked in the add-ins and that file
(.xltx) is there and not working.

Also, in VB references, Missing fsform.xlt was checked on. So, I unchecked
it and still not working.

Any solutions to this would be greatly appreciated.
 
G

Gord Dibben

Can you open fsform.xltx then in VBE select fsform2007.xlam and through
Tools>References checkmark fsform.xltx.

Save fsform2007.xlam

I have not worked with 2007 enough to be able to trouble-shoot much.

I am only guessing at this.


Gord
 
X

XX23

Gord -

I will try and let you know.

xx23


Gord Dibben said:
Can you open fsform.xltx then in VBE select fsform2007.xlam and through
Tools>References checkmark fsform.xltx.

Save fsform2007.xlam

I have not worked with 2007 enough to be able to trouble-shoot much.

I am only guessing at this.


Gord



.
 
X

XX23

Hi Gord -

I followed the steps you told and I am still getting the error message
"Financial Macros could not find the template to complete this task. I am
sure this is happening with the file I am using 2007 "fsform.xltx but it
works fine with .xlt.

Also, please note that fsform.xlam is an add-in linked to 2007 ribbon
interface.

Also, I noticed something regarding the template in the VB code:

If Dir(sPath & "\" & sTemplateName) = "" Then
MsgBox "The Financials macro could not find the template" _
& " required to complete this task." _
& Chr$(13) & Chr$(13) & "Contact your local Technology Services
" _
& "Organization for further assistance.", _
vbCritical, "Template not found."

Is there something I have to change here?

Thanks

XX23
 
G

Gord Dibben

Somewhere in your code before what you posted you must define and set

sPath and sTemplateName

Have you changed those to suit the actual path to fsform.xltx?

If your code works with fsforms.xlt I would imagine TemplateName is set to
fsform.xlt


Gord
 
X

XX23

I do not see the template name written in the VB code. But, if you know how
to search template name over there, could you please let me know.

Thanks

XX23
 
G

Gord Dibben

The code you posted below was taken from which workbook?

fsform2007.xlam?

Open a module in your project and do an Edit>Find. Checkmark "Current
Project".

Search for sPath

Or sTemplateName

Have to be in there somewhere.

You could send the add-in to me by email to gorddibbATshawDOTca


Gord
 
X

XX23

Ok. I found the sPath and sTemplateName
See the screenshot below:

' Get template information
Set wsLookup = ThisWorkbook.Worksheets(gsLOOKUP)
sPath = wsLookup.Range("TemplateDirectory")
sTemplateName = wsLookup.Range("TemplateName")
Set wsLookup = Nothing


What should I do now?

XX23
 
G

Gord Dibben

The named ranges of "TemplateDirectory" and "TemplateName" should provide a
clue.

Go to worksheet gsLOOKUP to find those named ranges..........see which
cells they refer to.

Change the strings in those cells. "TemplateName" cell probably contains
the *.XLT string.

Try this piece of code.

Sub changstring()
ThisWorkbook.Worksheets("gsLOOKUP").Range _
("TemplateName").Value = "fsform.xltx"
End Sub

If you sent me the file with the code I could possibly troubleshoot a little
easier.


Gord
 
X

XX23

Gord -

The email address you gave is not working. Please give a correct email
address.

Thanks

XX23
 
G

Gord Dibben

email address is gorddibbATshawDOTca

Change the AT and DOT to appropriate punctuation marks.


Gord
 

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