I have a vb6 application with crystal report 8. Running this application -
on window xp: one pc has Excel option like the below picture but
another pc doesn't have
on window 7: no Excel option
I browsed /windows/crystal and found U2FRTF.DLL is extra. And then I put it under another xp pc but still not see the option. Am I missing some steps - register dll ?
I'd like to have this excel option on window 7 64 bit. Please share your ideas.
Thank you.
The problem is that the 64 bit Windows system will open the 64 bit ODBC manager, but VB6 is 32 bit application. So you need to open the 32bit DSN manager to add your DSN. It can be found under: C:\Windows\SysWOW64\odbcad32.exe
You need to copy the dll with XLS in the name , probably u2fxls.dll. Check if there are any other dlls with XLS on the machine where this is working.
Related
I need information.
I am work on Microsoft Excel 365 (2016 32 Bit) and I have registered and installed mscomctl.ocx sp6 to get some additional control on my VBA project such as Date Picker, Listview Control, etc.
So far all works just fine on my PC.
My question, if my excel VBA project run on others computer that mscomctl.ocx sp6 not installed and registered, should my excel VBA project work fine too?.
If not, then I will considering to use any common control own by mscomctl.ocx sp6 and use only the excel 365 controls default. Or any others way to make it works fine on others computer as mentioned?.
Thank you.
I have code for an excel add-in I wrote over 20 years ago that I find myself needing again. It works fine in Windows XP and Excel 2003 in a virtualbox. In the VB6.0 IDE, I can load the code and make the dll which I can register as an excel add-in and use it in Excel 2003 within the virtual box. I can also use the VB6 IDE to debug it. I am looking to do the minimum to rewrite this for a short-term need to share with a small set of people in an organization using a current 64 bit version of Excel. They are in a locked-down environment so having them all run an old 32 bit version of Excel for this functionality is not an option.
Is there a version of Visual Basic which allows compiling for 64bit? I find references to what sounds like a VB7 IDE that would allow this. If it does exist, is it possible to get ahold of that anywhere? And will it actually make an add-in that will work with a current 64-bit version of Excel?
You can set registry entries to allow x64 to load x32 libraries.
So COM ignores bitness in EXE files. So any EXE file can be loaded by any COM client (and vice versa though no one cares). By setting registry entries you force your DLL into DLLHOST.exe.
COM loads a 64 bit stub into Excel and communicates to the stub. As far as Excel can tell it has loaded a 64 bit dll.
One problem is that one registry key you don't have permission to change. You must take ownership and give yourself permission to add an entry. There is no inbuilt tool to do this automatically, unlike for files.
This following reg file enables the MSScript Control, which allows you to execute VBScript and JScript as macro languages. Microsoft wants to kill VBScript and JScript and MS Script Control. So it is only available as a 32 bit dll for compatibility. It takes under a minute to add macro languages to any program. Contrast to VBA which you have to pay to use. Note the one line that requires TakeOwnership.
Windows Registry Editor Version 5.00
;MSScript.reg
[HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
#="ScriptControl Object"
"AppID"="{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}"
[HKEY_CURRENT_USER\SOFTWARE\Classes\Wow6432Node\CLSID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
#="ScriptControl Object"
"AppID"="{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}"
;This one needs to be done manually
[HKEY_CURRENT_USER\SOFTWARE\Classes\Wow6432Node\AppID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
"DllSurrogate"=""
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
"DllSurrogate"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
#="ScriptControl Object"
"AppID"="{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
#="ScriptControl Object"
"AppID"="{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\AppID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
"DllSurrogate"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
"DllSurrogate"=""
The reference is here but only DLLSurrogate is of interest to you - https://learn.microsoft.com/en-us/windows/win32/com/appid-key.
A more of a background reference - https://learn.microsoft.com/en-us/windows/win32/winprog64/process-interoperability.
I have several userforms that use ListView Control, but it doesn't load in some of our pcs with Windows 10 / Office 10.
I found out that the reference Microsoft Windows Common Controls 6.0 (SP6) was missing and then I learned how to register it using regsvr32.
Now that i have the reference correctly registered, I can see the listview control in the adittional controls list, and was able to activate it, but when I try to add the control to a form, the error in the Picture below shows up...
Does anyone know whats going on?
a) PC's with 32 bit Windows will run into issues with distributed files saved in 64 bit windows as the libraries are registered in different folders (System32 vs SysWOW64).
You could try to goto Excel, delete the library reference on a 32-bit-Office pc manually, re-enter a renewed ListView reference and re-save the project locally.
b) Furthermore the Treeview control represents no native MSForms control and cannot be used at all, if Office is installed as 64 bit version.
There exist professional solutions, such as a MSForms (all VBA) treeview (offering even a free code demo in a simplified version).
I have just done a complete new install (Windows 10, Delphi Seattle, Office 2016 64 bit). While I have worked with Office 32 bit before, Office 64 bit is new to me. I have an existing application I wrote, and I am trying to get the dev environment set up... I need both the Office_TLB and the Excel_TLB files. I know to create these via Importing type library. That went fine for Office, however when I go to Import a Type library for Excel, Excel is NOT listed as one of the 60 or so options. I did a search for Excel, and it is not there. It definitely is installed (64 bit only), and runs fine. How do I create the Library for Excel when it is not showing up as an option?
I have been able to create the TLB file manually using the TlibImp command. It may be due to the fact that Excel is a 64 bit executable, I don't know. Regardless, this solved my issue. This URL shows how: https://bobsotherblog.wordpress.com/2013/09/19/import-64bit-type-libraries-in-delphi/
I have an Excel application, with lots of macros in it. The macros in the workbook are signed. Some of the macros call Windows API functions and they have been ported to support 32-bit and 64-bit versions of Excel properly. The application works fine on different configurations (Windows XP, Windows Vista, Windows 7, Windows 8, Excel 2003, Excel 2007, Excel 2010, even some Excel 2013).
The application has been developped on a PC with Windows XP and Excel 2007, using the French Canadian locale.
I have one customer that has the following setup:
Laptop with Mac OS/X
Virtual machine with:
Windows 8 English
Excel 2013 English
When he runs my application, he always gets a Runtime error -2147319784 (0x80028018).
I tried to pin point where the error happens and it seems that as soon as the macros execute something referring to the Excel Object Model (for example: Application.ScreenUpdating = False) I get the error.
I tried to copy the exact line of code that fails in a new Workbook and it works fine without any error.
I have already seen a similar behavior in other versions of Windows and Excel with english versions of the products, and the way to solve the problem was to change de regional settings to US English. I tried it on my customer's machine and it didn't work.
I searched the web and found similar issues with Excel 2002 and I found a post in the Microsoft's Knowledge Base (http://support.microsoft.com/default.aspx?scid=kb;en-us;320369). This post applies to .NET VSTO applications, which is obviously not my case here. I can't change the current thread's locale as suggested in the article since this is not available from my VBA macros. I tried to copy the Excel.exe file to a 1033 folder and rename it to xllex.dll as suggested, but it didn't work either.
I even asked my customer to completely uninstall all Office products from his machine and just reinstall Excel 2013. Still doesn't work.
Honestly, I'm running out of options here... Can anyone help me solve this problem?
Thank you for your help!
Ghis
"Windows API functions" in a Mac. Can't imagine that'll work. Is your error this? "Old Format or Invalid Type Library" I'd say your code is not compatible with Mac somehow.
I don't know why the code would fail on a minor issue like Application.ScreenUpdating = False; but you already concluded that line by itself wasn't the problem anyway.
Sounds like you'll need to rewrite your code for the Mac.