Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help!
I have an Excel application which is based on two files:
1) a menu which the user will use to access the application. Eventually this menu will allow the user to do a number of things such as maintain static data used for lookups etc. Currently I am trying to impliment two features from this menu. (a) Open an existing data file and (b) open a new data file based on a template. I am having problems with both. 2) a template data file. If I create a new data file based on the template, I need to run a function that is contained in a standard module within the template file. I posted a question on this the other day and had two people suggest using Application.Run. When I do this my code looks something like this: Application.Run "myTemplate!routineName", parameter When I run the code I get an error message saying that it can't find the macro. I tried putting in the path name like this - C:\MyDir\myTemplate!routineName so the code would look like this: Application.Run "C:\MyDir\myTemplate!routineName", parameter This did not correct the problem. Help says this command will run a macro written in Visual Basic or the Microsoft Excel macro language, or to run a function in a DLL or XLL. I am also having a problem when I open an existing file. I posted a question on this yesterday and got no response so I will ask again. I am using the following code to open the file: fToOpen = Application.GetOpenFilename("Excel Files (*.xls), *.xls") Workbooks.Open fileName:=fToOpen When this runs, I get the file with a 1 at the end. If the file I am opening is "Test.xls" the file is opened as "Test1.xls". Any help would be greatly appreciated! Kevin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|