MS Excel VB Question:
Hello. I have Excel 2010. With the various Operating Systems in the office (Windows XP & Windows 7, etc..). Winzip may reside in C:\program files or c:\program files (x86).
I have current VB written within 1000's of Excel workbooks that executes Winzip and works properly for current Windows XP users.
But with Windows 7 users (WINZIP uses the program files (x86) folder thus breaking my code.
Current Code:
ZipFile = wb2
WinZipApp = "C:\Program Files\Winzip\WINZIP32.EXE -min -a -ex -s" & PW & " "
dbfile = wb2 & ".zip"
Call Shell(WinZipApp & " " & Chr$(34) & dbfile & Chr$(34) & " " & Chr$(34) & ZipFile & Chr$(34), 0)
(this is taking a wb2 variable and a PW (for a password))
Using this similar format, how would I write this ..since the path can be program files or program files (x86) ?
Any assistance would be greatly appreciated. Thanks.
Bookmarks