unknown
6/18/2012 10:29:00 AM
"GS" <gs@somewhere.net> wrote in message news:jrlrf9$5bb$1@dont-email.me...
> It happens that Henning formulated :
>> Missing & "\" in App.Path & gsAPP_WKB_UI12?
>
> Const gsAPP_WKB_UI12 As String = "\ui12su.xlam"
>
> I did not prepend the backslash to gszAPP_WKB because I use the name
> without it various places. The only thing gsAPP_WKB_UI12 does is setup the
> UI via its XML component in versions of Excel that use the 'Ribbon'.
Since you mentioned that you have a USB version, use a global variable
instead of using App.Path directly. App.Path could have "\" at the end if
your app is running from a root folder such as from a network drive
dedicated to applications, or USB drives. Example App.Path contents:
C:\Program Files\My App <- No backslash
E:\ <- USB or network drive, root folder, has backslash
So use code like this:
Public AppPath As String
AppPath = App.Path
If Right(AppPath, 1) = "\" Then
AppPath = Left(AppPath, Len(AppPath) - 1) ' Remove the trailing \, such
as in "C:\"
End If