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


ADVERTISEMENT

Convert Multiple Versions Of Cell Contents To Single Version?

Feb 28, 2014

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 Related

VBA Print Preview Code Causes Crash If No Printer Installed

Aug 23, 2009

activesheet.printpreview , Excel crashes if there are no printers installed on the machine. How can i check for printers before calling the printpreview, or else stop the program from crashing?

View 2 Replies View Related

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

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 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

CreateObject Command, Is There A CloseObject?

Sep 10, 2009

I have the following in my code ......

View 10 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

VBA Help Not Installed

Mar 15, 2008

I'm creating vba macros and need access to the vba help files, but I keep getting messages saying "not installed". Can I install these somehow?

View 2 Replies View Related

Calendar Control Not Installed!

Dec 8, 2006

I got a file from someone that uses a Calendar Control in a user form, but my machine does not seem to have it installed, and Excel removes the control. I have Excel 2003 with SP2. I use the same version on my home machine but it does have Calendar Control, and the file works fine there. I tried copying the MSCC.* files from the OFFICE11 directory from home to this machine. Is there some straightforward way to install that control?

View 3 Replies View Related

Force An Addin To Be Installed

Mar 26, 2007

Is it possible to force an addin to be installed in Excel 2003 using VBA? I have a spreadsheet that uses the solver.xla addin in a vba macro. It works fine on my machine, where I have manually ticked SOLVER in Tools>Addins and manually added a reference. However, it does not work when I send to someone else. It seems that the addin is not being installed. I have VBA code that opens it:

On Error Resume Next
s = Application.LibraryPath & "solversolver.XLA"
Workbooks.Open filename:=s

but even with this, i get a "Unexpected internal error occurred, or available memory as exhausted" when I try to run the following

On Error Resume Next
ActiveSheet. Unprotect
Application.Run "Solver.xla!SolverReset"
Application.Run "Solver.xla!SolverOk", "$D$46", 2, "0", "$L$13:$L$14"
Application.Run "Solver.xla!SolverOptions", 100, 100, 0.000001, False, False, 2, 1, 1, 0.05, True
Application.Run "Solver.xla!SolverOk", "$D$46", 2, "0", "$L$13:$L$14"
Application.Run "Solver.xla!SolverSolve"
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios _
:=True

The one way to make it work is manually going into Tools>Addins and ticking it. This is confusing me as the above, along with the code that opens it, should not even require a reference, but it doesn't work without it

View 2 Replies View Related

Inserting Hyperlink On Installed Picture?

Jan 19, 2014

I got code that is installing a picture over a range on my sheet.

Now, I would like to add an hyperlink to the picture so if I click on it, I will be opening my Snap Picture application

Problem is every time I create or install a new picture, the name of it change so I can't install an hyperlink over a picture that I don't know the name...

Code:
Sub test2()
Dim MyDocument As Variant
Dim MyShape As Variant
Dim SelectImage As String

[Code]....

View 2 Replies View Related

Convert Worksheets To PDF Without PDF Printer Installed

Nov 3, 2006

I would like to save a Sheet as a PDF, however I do not have access to install a PDF-printer service (like PDF995 etc) on all the PCs at work. I've been Google-ing for the past week, and there are a lot of options out there, however all the options I have found fall into 3 categories;

- Prohibitively epensive
- Install a Printer
- Convert text only

I need something that mimics the output of Distiller (which I have at home) as either an excel addin or a stand-alone program which I can run via Shell. (I should be able to cope with the VBA for this : D) I don't need charts etc printed, however I do need a simple graphic (logo) to be included.

View 2 Replies View Related

WinRT Driver Not Installed Message Installing Add-in

Oct 1, 2006

I wish to add a add in in exel XP 2002 with Windows SP2. For that I have three file has to install:

1 fichier.lgc has to install in Windows applog
First problem I do not find this repertory hidden under same XP SP2 with the good options to select in Windows to explore. Thus I have to arrange this file in Windows appPatch and in Windows Prefetch in the place and the problem comes from I think.

1 fichier.xll has to install in office xlstart
1 fichier.ppp has instaler in office xlstart

And when the double click on the fichier.xll for the throw the error message is as follows “WinRT Driver not installed”. Thus my questions are is this normal that I do not find the file Windows applog under win XP SP2 and how to install WinRT driver. Or then where to arrange my fichier.xll which must normally be in the repertory Windows applog

View 4 Replies View Related

Excel 2010 :: Data Analysis Installed But No Window Appearing

Dec 8, 2013

We are running Office 2010 part of Office Professional Plus 1010 (corporate install). We have added both the Analysis Toolpak and Analysis Toolpak - VBA to the add-Ins and have the button on the toolbar, however when we click on the button, we don't get the popup window allowing the user to pick the analysis tool they want to use. Have tried this on a number of PCs (we all run the same version) and it doesn't work on any of them.

What we have to do do make this toolpak work?

View 8 Replies View Related

CreateObject: Object Variable Or With Block Variable Not Set

Nov 29, 2006

I have my below code which will create a looping "ftp" and "get" effect.
However i am having some problems right now. There's always an error that states "Object variable or With block variable not set".

Sub File_Transfer_testing()

Dim N As Integer
Dim Lotid As Variant
Dim Tester_array(1 To 15) As String

Tester_array(1) = "10.10.10.10"
Tester_array(2) = "20.20.20.20"

Lotid = InputBox("Input a LOT ID")

N = 1

Set fs = CreateObject("Scripting.FileSystemObject")
Set A = fs.CreateTextFile("C:script.txt", True)
For N = 1 To 2
A.writeline "open " & Tester_array(N)
A.writeline "xxx" 'username
A.writeline "xxxxxx" 'password
A.writeline "cd /zzz/reports"
A.writeline "prompt"
A.writeline "ascii"
A.writeline "mget " & Lotid & "*sorts" 'file to be uploaded
A.writeline "quit"
A.Close

Set fs = CreateObject("Scripting.FileSystemObject")
Set A = fs.CreateTextFile("C: upload.bat", True)
A.writeline "ftp -s:C:script.txt" 'the ftp site
A.Close

dRetVal = Shell("C:upload.bat", 0) 'upload the file
''''''''''end upload.bat file
Next
MsgBox ("Done")
End Sub

View 3 Replies View Related

VBA To Recognize Xl Versions

Jun 3, 2009

I have some codes that require different values when running under xl2003 vs. when running under xl2007.

View 11 Replies View Related

Macro For Different Versions

May 4, 2009

I 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

View 9 Replies View Related

Installing 2 Versions (or Office On Same Pc)

Nov 23, 2008

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!

View 11 Replies View Related

Multiple Versions - One Computer

Feb 13, 2009

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?

View 9 Replies View Related

Differences & Incompatibilities Across Versions

Aug 26, 2008

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,

View 7 Replies View Related

Store & Compress Old Workbook Versions

Mar 19, 2007

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?).

View 11 Replies View Related

'INDIRECT' Formula Across Excel Versions

May 22, 2009

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 Related

Ordered Table (compatable With .xls Versions)

Jan 4, 2010

The 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 Related

XLS File Type Association With Two Versions

Apr 8, 2008

I 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?

View 9 Replies View Related

Creating A VLOOKUP Using VBA Code?

Feb 4, 2014

I have a workbook containing 2 sheets called ('EPM Extract' and 'Sheet B'). Column 'B' of the 'EPM Extract' sheet contains a list of Project IDs (numerical), and 'Sheet B' also contains a list of Project IDs (also in column B), plus all of the additional data I require.

Now, from the required cell within the 'EPM Extract' sheet, the normal Excel the code would read as =vlookup(B3,'Sheet B'!B5:W32,11,False), upon which I would drag down the code from that cell to all other required cells below. However, these are my issues:

* How do I even begin to write the code within VB, as I know that variables and arrays have to be set

* I need to apply the vlookup across 12 columns as I am bringing back 12 different results (i.e. I need to copy results from column counts 11 to 22 from 'Sheet B' to columns in 'EPM Extract' sheet.

*The amount of data in the sheets will vary each month, so I need to know how to apply the code only to the amount of rows in the 'EPM Extract' sheet, so some kind of R1C1xl.UP will need to be defined also.

View 9 Replies View Related

Why Creating Another Workbook When I Run This Code

Jan 29, 2008

I have a workbook with four worksheets named
FilteredData
FilteredDataFormat
array
arrayFormat

The two sheets named FilteredDataFormat and arrayFormat exist strictly to preserve headers , and column widths.

So that for convenience sake I can clear my data without specifying a range that excludes the headers.
I simple clear the contents of the 'FilteredData' and 'array' then copy and paste 'arrayFormat' and 'FilteredDataFormat'.

Sort of an unconventional and lazy approach but I see no reason why this will not work.

Here is my original code and what happens is that excel creates another workbook for some reason unknown to me

View 10 Replies View Related

Code Is Creating A New Page?

Oct 30, 2008

For some reason the following code creates a blank page everytime. Is there a way to have it not do this that I am not seeing?

View 2 Replies View Related

Creating CommandButton With Code

Sep 9, 2006

how to create commandbutton code so let me explain what I am trying to do and anyone that could provide me with some basic code details to solve my problem:

When the command button is clicked in an excel worksheet I want a pop up box to come up containing specific information sourced from two other excel worksheets depending on the commandbutton. What I want to know is what code do I enter from the visual basic view in order for the box to appear with the right information.

View 2 Replies View Related







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