Run Different Code Based On Version

Aug 2, 2008

I am writing an excel 'tool' that must be compatabile with both Excel 2003 and Excel 2007. I originally wrote some functions using Application.Filesearch, and had to re-write that code due to the lack of Application.Filesearch in Excel 2007 (I used the chdir method). The chdir method is much slower the way I am using it, therefore, I would like to still use the Application.Filesearch method for those using Excel 2003. Now, I have the user select their excel version and run the correct macro. Is there a way to detect the Excel Version automatically and the call the correct macro?

View 2 Replies


ADVERTISEMENT

Return Version With VBA Code

Feb 15, 2008

Is there a way to find out which version of excel somebody is using within VBA?

View 2 Replies View Related

Determine Version Number Via Macro Code

Apr 17, 2008

This is probably a simple question, but I couldn't find the answer by searching...

I have a macro that I wish to run which calls one of two different macro's depending on if the user has Excel version 2007 or if they have an earlier version.

This is to overcome 'Save as PDF', which only works in Excel 2007.

View 3 Replies View Related

Need To Know Version(2003/2007) True Macro Code.

Sep 29, 2009

I need to find out which version of excel i am using in macro.I mean whether it is 2003 or 2007.Because i need to put 2 diff codes according to the version of excel.Can any one please provide me the macro code to findout the version of Excel.

View 9 Replies View Related

2 Versions Installed But CreateObject Code Creating Old Version

Nov 27, 2009

Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = False
xlApp.Application.DisplayAlerts = False
xlApp.Workbooks.Open ("somepathWebquery.xlsm")
xlApp.Application.Run "'some macro"

The only problem is, the web query will only work properly if it is in Excel 2007 (2003 will parse the table in a way that is not acceptable). However, when I tried to run the script, the stubborn Excel 2003 will show up. I even tried to uninstall the Office Compatibility Pack and the stubborn Windows will only run Excel 2003 and ask me to download the Office Compatibility Pack instead of giving me Excel 2007.

I tried to open it up using Open With...and it did not work, I even tried to regserver and unregserver and that did not work as well. Somehow Windows thought the only Excel I have is Excel 2003.

Is there anyway I could change the VB Script so that it would force Excel 2007 to open?

View 6 Replies View Related

VBA Code For Opening File With Variable Version Number In File Name?

Jan 29, 2014

I have a file that I save with a new version number each time I make major changes. The file name currently is: "Telephony Equipment Inventory v26 (Summary).xlsm". The "26" is the variable number. give me the vba code to ensure I open the file with the highest version number?

View 6 Replies View Related

Code To Delete Rows Based On Status Code In Column

Jul 24, 2009

I'm trying to write a VBA script which will delete all rows in my Excel spreadsheet where Column I (which contains a status code) does not contain the word "Completed".

At the moment, I'm doing this the other way round: my script is able to search for entries in Column I which contain the status codes "Pending", "Awaiting Authorisation", "In Progress" etc and delete them. The idea is that when all those rows are deleted, I'll only be left with rows which have a status of "Completed". This works fine at the moment. However, the concern is that if a brand new status code is added to the data file, my script would be unable to pick it up and delete it. This is a small sample of the code I'm currently using (which deletes all the rows with statuses other than Completed):

View 4 Replies View Related

Specify Excel Version To Run VB6

Jan 15, 2009

I have Excel 2003 and 2007 on my computer and I want open excel from vb6 but they are both called Excel.exe. So it opens both of them when I run my code. I renamed one of the exe's and I was going to do it that way but then it was going to do a whole bunch of reinstalling.

Can I specify which version of excel I want to run, in vba or vb6 code ?

Maybe by specify the path some how.

View 14 Replies View Related

Version Number?

Jan 19, 2010

If I want to create an Excel file that other users would use, and want to create a specific version number of the file. Is there a place I can save that information outside of the worksheets?

For example, lets say I create a file that is version 1.0. Can I save that somewhere in "Properties" or somewhere else so that "1.0" can't be modified, and if I come out with a different version say 2.0, I can update it?

View 9 Replies View Related

Set Default Version

Aug 23, 2007

As per title, I have both Excel 2003 & 2007 installed - I need to set 2003 as the default for opening xls files when double-clicking but can't seem to override 2007 which wants to hog all the action. I've been through the File Types menu and selected the 2003 version of Excel as the default, but it doesn't make the slightest difference.

View 9 Replies View Related

Get Version Of .dll File

Feb 2, 2008

how to get version number of the .dll file (in the path C:program files....) using VBA code. The properties of that .dll file has a tab named "Version". so i need the version number displayed on that tab.

View 3 Replies View Related

VBA To Change A Particular Cell Version 2

Dec 10, 2008

In a previous thread I asked for a solution to the following problem

Cells
A1 = 1
A2 = 2
A3 = 3
A4 = 4
etc.

What I want to do is when I click on cell A1 the value is put in cell C1.
When I click on cell A2, C1 changes to to A2 value and so on.

VERSION 2
The VBA I received is good for 1 range.
Is there a way to use multiple ranges? In my example above column A is the 1st range and cell C1 changes accordingly. Now i would like to use column B as a 2nd range and have cell D1 change accordingly.

View 2 Replies View Related

Automatically Update To New Version?

Sep 25, 2009

I have an excel based appliction that I distribute to about 150 people in the US, London, Hong Kong and Singapore. Distribution is currently done by email containing a link to a Sharepoint site (the email has the link, release notes, etc). The end users open the file and save it to their desktops, overwritting the previous version. I'm finding that many users are not updating their versions as they should be.

So what I'm wondering is if there's a way to have this process automated - so that when the user opens the file, it checks a repository (sharepoint or otherwise) for a more current version, then prompts the user to download it.

View 5 Replies View Related

Trapping File Version In VBA?

Dec 11, 2012

how I could amend the following code so that my target worksheet includes file versions? The worksheet range "Folder" contains a string specifying the target folder and the worksheet range "IncludeSubFolders" is either TRUE or FALSE. I can trap FilePath, FileName, FileSize and DateModified fine but not File Version (I'm working with DLL libraries).

Code:

Dim iRow As Long
Sub ListFiles()
iRow = Range("DatabaseStart").Offset(1, 0).Row
Call ListMyFiles(Range("Folder"), Range("IncludeSubFolders"))
End Sub

[Code]......

View 1 Replies View Related

Multipage - Vertical Tab Version

Jun 9, 2007

I need to create a multipage with tabs running down the left hand side. I cannot use the normal horizontal multipage control because this would result in an impossibly wide page. Is there a vertical multipage control? I could not find one? Or a way to convert the multipage control to show vertical tabs?

Please bare in mind that this vertical multipage will be shown in a form that already includes a normal horizontal multipage (I am using multipages within multipages too!).

View 9 Replies View Related

Database Version Control

Mar 11, 2009

We have a club membership database in Excel 2003. Unfortunately too many people can change it and we sometime use an old version for a mailout when there is a later version around. We have no easy, foolproof way of establishing which is the latest version.

Is there a way that a cell in the database can automatically have the date & time it was last changed (NOT last time it was read - Windows does that). Also a user name.
Failing that, is it possible to detect when anything has changed & when you try to close the file it requests a date & user which have to be entered before it closes ( this relies on the user putting in valid info but at least it's a start).
Ideally when you re-open the file it should say in A1, A2 - last changed .... by .....

View 9 Replies View Related

Autosave To Older Version

Jan 2, 2010

Please review the following and advise the one Best Connection needs to save in Excel 5.0/95 format without prompting me about incompatability issues

Sub Tomo() ....

View 9 Replies View Related

Vba Version: Search For Topics

Mar 21, 2007

I've made a workbook in office2002, and it's work fine. but when i run it from PC with office2000 I've encounterd some vba erorrs. NOW I want to search for topics talking about this topics.

--- In General Idea-----
How to be sure that my work will work fine with all versions.

View 3 Replies View Related

Trial Version That Expires

Jun 3, 2007

how i can make my excel file triel and can use just for 7 days?

View 4 Replies View Related

Version Limitations On Countifs Functions?

Mar 27, 2014

I recently bought a new Dell XPS 10 tablet with a keyboard. When I copied my spreadsheets from my old notebook, none of the countifs or countif functions are working, all popping out a zero. It work completely fine on my old notebook on which I have Excel 2010 installed. On the tablet I have the pre-installed Home & Student 2013 RT. Could this version have limitations to my functions? What can I do to get my functions working again?

View 4 Replies View Related

VBA Test For Finding Excel Version?

Dec 7, 2008

Is there a way in vba to test to see what version of Excel is being used? My macro would crash if their data would exceed the 65K row limit in Excel 2003. I have a message that pops up if they do that, and it handles the problem just fine, but if they are ALREADY using Excel 2007 (or whatever comes later) I don't want the message to appear.

View 9 Replies View Related

Convert MDY To DMY With Text Version Date?

Dec 12, 2011

I have some date data use MDY format. Want to convert to DMY format. But text to columns function doesn't work as those dates are text not numbers. How can I do the convertion?

examples:

3/14/19644/18/1964

View 9 Replies View Related

User To Enter Date (US Version)

Dec 13, 2011

I have a userform where I want the user to enter the date (US Version)

I want them to enter 121311

I want the textbox which I am using to show 12/13/11 when they exit from it.

Here is my code i am using:

Private Sub mm_built_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim mm_date As Date
Me.mm_built.Text = Format(mm_date, "mmm/dd/yy")
End Sub

What shows when they exit the entry for the above is Dec/30/99

How do I get it to show correctly?

View 5 Replies View Related

References To Tables In Version 2007

Aug 18, 2007

The new table feature of Excel 2007 is IMO the best improvement over the 2003 version.

I have 3 questions about references to these tables:

1) When you reference to a cell in a table on the same row, you get the reference "#This Row". Why isn't there a "#This Column" reference?

2) Normally when you want to "fix" a reference to a cell you use the $ sign by hitting F4 (i.e. A1 -> $A$1). How can you do this with tables (Column1 will not change to $Column1 when hitting F4)?

3) When I have = sum(Column1) above Column1 and I drag this to a cell above Column2 I get =sum(Column2). However, when I have the formula {=sum(Column1)} this doesn't work. Why?

View 9 Replies View Related

Prevent Save As Version Message

Oct 17, 2006

I have an extensive application which I wrote using Excel 2002 (XP - Version 10). However it will likely be used on anything ranging from 2003 - 1997. When I tested it using Excel 97 it gave me the traditional [annoying] message asking if I was sure I wanted to save it under an earlier version than which it was created.

I want to get rid of this message (a lot of my users aren't the most computer literate and the more annoying messages I can avoid the better!)
I tried using:

Application.DisplayAlerts = False


but it doesn't affect this particular message. I need to know how to keep this message from popping up. Please Help.

Under 97 (NOT on my 2002) it also gives a "Do you want to save the changes" message upon closing even though the "DisplayAlerts" is set to false. I'm not sure why this is still coming up.

View 9 Replies View Related

Version 97 IF Formula Not Recognized In 2003

Nov 17, 2006

The following simple formula was written in Excel version 97. when I try to use it on a newer version (03) it does not seem to recognise it as a formula? =IF(F66="yes",1,IF(F66="N/A",1,0))

View 2 Replies View Related

Compare Version Number Strings

Dec 13, 2006

I have two numbers, they are version numbers, I am having problems with my If then else and elseif statements.

59821 for version 5.9.8.2.1
is more than
5983 for version 5.9.8.3

even though 5.9.8.3 is a greater version number. Do you see where my problem is. How do I compare # by # reading it, checking to see what one is bigger and going from there. so when it gets to the 3 of the 5983 its bigger than 2 of 5982 of the 5.9.8.2.1

View 2 Replies View Related

UserForms & Events: Cut-down Version Of The Spreadsheet

Dec 15, 2006

I am trying to reconstruct my problem with a cut-down version of the spreadsheet so possibly I might be able to post something in the future. Here is my scenario:-

1. workbook, containing 3 sheets opens with "sheet1" selected. Sheets 2 & 3 are hidden.

2. simple userform containing 1 combobox and 1 command button display as part of workbook_open() event. Combobox takes as its rowsource a range from sheet1

3.on pressing command button, userform is hidden (not unloaded), macro generates a dynamic SQL statement (using contents chosen from combobox), unhides "sheet2", selects "sheet2" which contains a querytable, updates the command text using the dynamic SQL, refreshes the querty with background refresh = false (i.e. query is completed before macro continues), re-hides "sheet2"

4. macro continues (still originating from the command button on userform), unhides "sheet3", selects "sheet3" which contains a pivottable, using the results of "sheet2" as its datasource.

5. The worksheet_activate() event of sheet3 includes code to refresh the pivot table so as soon as the sheet is selected the PT is refreshed "before the users eyes" with the new data.................

View 4 Replies View Related

Compare Worksheet To Newer Version

Jul 1, 2008

during the executiuon of a macro, I would like to " record" the content of a given worksheet. Later on, I'd like to compare the recorded contents with what the worksheet presently looks like, and return True if the content of at least one cell has changed, False otherwise.

View 2 Replies View Related

Outlook Object Library In Different Version Of Office

May 5, 2014

Our office has different versions of Office on different computers. We have a file containing macros specifically macros that interact with Outlook requiring the Outlook Object Library. If a 2013 opens and saves the file all the libraries get changed to 15.0. Then a 2010 Office opens the file ... the Excel Objects and Office Objects libraries change to 14.0 because of 2010, but then we getting the error about missing library. Instead of loading the Outlook 14.0 Object Library like it's supposed to the systems tries to find the 15.0, but can't find it and throws the error.

I have to manually go in to References and uncheck the Missing 15.0 outlook library and find and check the 14.0 one and click ok then the macros work fine.

My question is why do the other object libraries automatically change depending on the version of office and the outlook one doesn't.

Interestingly enough this doesn't happen the other way e.g. 2010 to 2013. Ones the file is saved using the 2010 with the 14.0 references 2013 has no issues converting those references to 15.0.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved