Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Lista Forumurilor Pe Tematici
|
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login
POZE MRRRR'S FORUM (VIEW ONLY)
Nu sunteti logat.
|
Nou pe simpatie: pisi_dulce
 | Femeie 25 ani Maramures cauta Barbat 28 - 57 ani |
|
|
TRaP
Moderator
Inregistrat: acum 8 ani
Postari: 951
|
|
Normally VBA7 applies to all users on Office 2010 or newer, and VBA6 to legacy Office 2007 or older.
If want to check, add this to a module and run:
Sub CheckVBAMode() #If Win64 Then MsgBox "Running VBA7 (64-bit Excel)", vbInformation #ElseIf VBA7 Then MsgBox "Running VBA7 (32-bit Excel)", vbInformation #Else MsgBox "Running VBA6 or older", vbExclamation #End If End Sub |
If you want to offer compatibility with VBA6, use the following before all your code in a module. It does not matter if one of the lines is red in VBA, it will not error regardless of VBA version.
#If VBA7 Then Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _ ByVal hwnd As LongPtr, ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPtr #Else Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _ ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long #End If |
Source: Gemini
|
|
| pus acum 2 saptamani |
|