VBA To Recognize Xl Versions
Jun 3, 2009I have some codes that require different values when running under xl2003 vs. when running under xl2007.
View 11 RepliesI have some codes that require different values when running under xl2003 vs. when running under xl2007.
View 11 RepliesI have been working on this spreadsheet off and on for a while now. I have a macro that works in Excel 2007 and a different one that works in 2003 (thanks to the help of Mr.Excel.) My problem is, the people who will be using this spreadsheet all have various versions of Excel. Is there a way to script this macro to work for all versions, or do I have to have a different script for each version of Excel? The one I am currently in need of is a script for 2002. See below for the script for the 2007 version. If there isn't a way to make a "one for all" solution, some assistance on a script that would work on 2002 would be great! The section in red is the section that returns the error when people try to run it with earlier versions of Excel.
ActiveWindow.SmallScroll Down:=-9
Columns("B:G").Select
Selection.Copy
Columns("B:G").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Columns("L:N").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Range("N11").Select
ive got my highly expensive office enterprise 2007 disk
what is the best way of installing this so i can still use 97 and 2007. any tips?
i wont bother with outlook but i'd like to try the rest ,mind you onenote,infopath and groove are a complete mystery!
I'm running Excel 2007 with Windows Vista. I also have Excel 97, which I was told would not run with Vista. I've since discovered that many programs that I was told wouldn't run with Vista seem to work fine.
Is it possible to install Office 97 on the same machine with Office 2007?
I may be creating a small Excel-based VBA application for a client on a semi-formal basis. I personally use Windows XP with Office XP installed, but I'm concerned about the possibility of serious differences between versions of Windows and Excel that may cause my code to fail on other machines.
I don't think I need to cater to any version of Excel BEFORE that in Office XP, but I probably do need to cater for versions after it. That's Office 2003, Office 2007 and Office for Vista,
I'm looking for is ComplyXL and that costs $300 to buy. So, as a poor grad student, I'm looking for an alternative solution - either a freeware program or a hassle-free VBA code.
So here's what I need the code or program to do: When I ask excel to open a pre-existing file, I'd like it to automatically rename (& compress?) the last used version of the file & save that to a filename-specific archive somewhere (hidden?), before opening the file as requested. Alternatively, I suppose that a mirror copy of each 'just used' file could be created & saved to an archive folder whenever the used file is saved & closed.
--Note: to avoid making copies of EVERY workbook I ever use, I suppose there should also be a button in the toolbar or a file-associated setting that lets me identify which files I want this task to apply to...
Basically I'm looking to have excel automatically save versions of certain key files (like Word's 'Versioning' feature) without having to remember to 'Save As', without the versions taking up much space, and without having to store the older file versions in the same place as the most recent one.
And yes, I know that a similar problem has already been posted & solved here, but they didn't include a way to choose which files used versioning nor (if it's possible) a way to compress the archived versions to save space (maybe by adding it into a WinRAR archive somewhere?).
I have made a file that works perfectly in excel 2007, but when I send it to a client it doesn't work as they have 2003.
View 12 Replies View RelatedThe document shows a table on the left that puts the data from the table on the right into order by total (and if same, alphebetical by name). However the formula used to achive this is not compatable with previous versions of excel. Need alternative function that will bring the same outcome but work with pre 2007 versions (ie .xls file extention).
View 3 Replies View RelatedI am changing the file type association for .XLS to
C:Program FilesMicrosoft OfficeOffice11excel.exe
I'm using "Change" and "browse" to set it to that exact file. However it still starts version 12 (XL2007) which is dual installed with version 11 (XL2003).
I was successful in creating a shortcut that opens version 11, despite Microsoft's apparent attempt to thwart that; now I need to fix the file association. (Try to directly edit the Office links in your XP Start Menu - how the target is grayed out?
I have a dir with over 150.000 files in it, especially pdf, doc and xls. Now I'm looking for a script or program that will automatically search the entire directory and look for old xls files, open them and save them in a new(er) version. I'm working with a software that needs to use these XLS files in my directory but it can't use the old xls-versions. It's an impossible job to search by hand for the old versions and put them in a new(er) version.
View 11 Replies View RelatedWhen I attempt to send a spreadsheet using a German version of Excel, the following formula does NOT work properly.
=ZELLE("adresse",C14)
The function gets translated into =CELL("adresse", C14), and what I need is, obviously, = CELL("address",C14). The argument does not get translated.
Compatibility mode, in 2007, is frustrating me like crazy. I thought it was supposed to 'limit' functionality to what was in 2003. But what it seems to be doing is letting me use features that only work in 2007and then tell me when I save that 'hey, these won't work after you save'. Ugh! I can't even pick a highlight color without getting a warning and wondering what it will look like to 2003 users!
Is there a 'theme' or anything that will truly limit the features I use to those available to 2003 users?
I have to run a daily report from winxp or win2k and need to change the host files a few times for access.
I tried to use %systemroot% in the file path, but for some reason vba doesn't like it.
Here's the snippet I'm using for copying over the host file based on user choice: (the thing works if I change to the actual system root path (C: etc...)
Private Sub CommandButton1_Click()
Select Case ComboBox1
Case "- Choose -"
MsgBox ("This is not a choice")
Case "BTR"
I've found a link on OzGrid "How to remove the (X) CloseButton from Userforms" but I can't seem to get it to work with Excel 2003. The code looks like it was written for Excel '95, '97 and 2000.
View 6 Replies View RelatedSet 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?
Add Multiple Buttons That Select Row Of Housing Cell. One of my Macro's places a button on a sheet using Top/Left;
Set sbut = Sheets("Listings").Shapes.AddFormControl(xlButtonControl, _
Range("J" & count).Left, Range("J" & count).Top, 50, 12)
When I try to find the row of the clicked button using the following code;
Range(ActiveSheet.Buttons(Application.Caller).TopLeftCell.Address).Activate
The code behaves differently in Excel 2002 and 2007. In 2002 it returns the row the button sits on, but 2007 returns the cell above the button. This could be because the workbook is an XLS running in Excel 2007 in compatibility mode? Is there a way to "nudge" the button down a little after it has been placed using .top/.left ? Or is the only way around this something like;
Range(ActiveSheet.Buttons(Application.Caller).TopLeftCell.Address).Activate
count = ActiveCell.Row
If Application.Version >= 12 Then
count = count + 1
End If
Is this a bug, or something that I am doing wrong ? The workbook needs to be a .xls to ensure that it works in older versions of Excel.
I would like to automate the conversion of multiple versions of company names contained in cells to a single company name. i.e. XYZ Inc., XYZ Co., XYZ to all cells XYZ. My data file contains numerous versions of company names. I want them to all be the same company name so sorting data is easier. I now do this manually and it is getting tedious and time consuming. Can I build a table with the different versions that then chamges the cells to a single version that I choose?
View 1 Replies View Relatedi downloaded the beta version of the office 2007 for testing. can i install this version alongside my existing office 2003 version. i want to have the 2 versions installed on my computer so that i can choose between the versions when opening a file.
View 3 Replies View RelatedAny recommendations on vlookups being able to recognize a value that does exist within a table? It returns an N/A and the formatting is the same for both references.
View 9 Replies View RelatedI am trying to write a macro for excel, deleting columns of #N/A generated in a text file. I'm having a hard time identifying the #N/A in the cell. I've tried
If Cell.Value = "#N/A" and tried if IsError("A1").
I am trying to filter data in one sheet depending on a variable in another. But even though I have the same formatting in both sheets it will not recognize the number. I have tried everything from pasting values, to pasting the same formats in both areas, using the F2 option, but nothing seems to work. My single value is in Sheet1 B2. The rest of the data I'm filtering is in Exceptions2 with the filter criteria residing in column A. I have headers in row 1.
Sub Recall_BT()
Sheets("DataEntry").Unprotect
Sheets("Exceptions2").Visible = True
Dim rr As Range, r1 As Range
Dim r2 As Range
Dim r3 As Range
Dim rCell As Variant
rCell = Sheets("Sheet1").Range("g3")
Dim sh As Worksheet
Dim wsCopyTo As Worksheet
Application.ScreenUpdating = False
Set sh = Worksheets("Exceptions2")
sh.Select
sh.Range("A1").CurrentRegion.AutoFilter Field:=1, Criteria1:=rCell
Set rr = ActiveSheet.AutoFilter.Range
Set rr = rr.Offset(1, 0).Resize(rr.Rows.Count - 1, 1)
On Error Resume Next
Set r1 = rr.SpecialCells(xlVisible)
On Error GoTo 0...................................
I am having trouble creating a formula to help me recognize the 4 cells that I have.
On C1, I need this cell to identify the numbers in E1, F1, G1, and H1.
On E1, F1, G1, H1 each of the cell have a number.
If all the cells (E1,F1,G1,H1) have a digit, does not matter what number it is, than C1 would automatically place "ABCD" and in white.
E1 = A
F1 = B
G1 = C
H1 = D
any time a cell has a digit, then C1 would tell me which of those cells are used with A,B,C, or D.
In the given example below how can i recognize the last number which is LV-00010 and after recognizing the last number i wanted to add 1 so the next number will be LV-00011 (im using this as an automatic ref. no.).
LV-00007
LV-00004
LV-00010
LV-00008
LV-00009
LV-00001
LV-00002
LV-00006
LV-00003
LV-00005
I realize there are a number of threads on this topic, and I've read through them but have been unable to apply those answers to this problem. I've attached a sample of the worksheet in question. The worksheet is supposed to tell me if messages are supported via a certain Network (BFX).
Column A is the result of a VLOOKUP function, which returns Yes or No if the entry is found, or #N/A if the entry is not found. Column B is my attempt to translate column A into strictly "Yes" and "No", converting an #N/A into a "No". For some reason, the ISNA( function I'm using doesn't seem to work, as highlighted in row 18.
=SUMIF($A$2:$A$9,F2,OFFSET($C$2:$C$9,1,0))
It works great.
The issue is that the information (time) that I import into excel doesn't show as information if there is a zero in front the amount of hours. I can physically see the information but have trouble using it. For instance if I add
(A1) 05:25:25
(A2) 10:25:25
(A3) 02:25:25
If I total/SUM this my total is 10:25:25. It will not recognize anything under 10 with a first digit as a zero. So for me to add this I use:
=SUMPRODUCT(B3:B25+0)
This also works great. Now on to my issue.
I am using the 1st formula to grab data i.e. (A1). It will not recognize that as anything. It comes up as zero. I can't figure out what to add to the 1st formula for it to recognize the info.
The issue: Theres about 300 rows of data arranged in multiple columns. One column has a dollar amount and another column has a code. Data gets entered into the sheet periodically so every new dollar amount needs to be transferred to another sheet by recognizing the right code.
What I want to do: I want excel to recognize the dollar amount and attribute it to the code in the same row. Then sum and transfer that amount to another sheet and if possible add it to an existing amount the in the correct cell.
The final outcome should be that any user of the document can just copy and paste data into one sheet and the document automatically generates the costs in another sheet. And if possible every dollar amount should be linked to a code so a user can just click on the amount and see where it came from and under what code it falls under.
I need a function who can recognize the format below and return TRUE or FALSE. See example.
View 5 Replies View RelatedHow can I make excel to recongnize this: 123456- as a negative number?
View 7 Replies View RelatedI have created several functions in VBA that operate on arrays created by other functions in VBA, however they don't recognize cell ranges as arrays. For example, the UBound function doesn't work with a range argument within my function.
How can I get my functions to recognize cell ranges as arrays, as well as arrays that I have created directly in VBA?
I created a lookup helper sheet to do some data cleanup and serve as a key for future use.
The problem I'm having is that things that I am doing a vlookup on won't find the corresponding value in the key table.
So in the original sheet I had "blueberry" in the helper/key sheet I have "blueberry" as well. But I still get the "#N/A" error.
The key values in the helper sheet were all derived from the original by using a pivot then copying those values so there were only unique values over to the helper sheet.
I had them both formatted as general and tried formatting to text as well.