AcadPreferences

AcadPreferences

Anonymous
Not applicable
370 Views
1 Reply
Message 1 of 2

AcadPreferences

Anonymous
Not applicable
VBA Newb here... I am trying to figure out why this code is not working as the tutorial I am using suggest so. I created a module, inserted the code and debugged and get a compile error and the '.RenameProfile..... is highlighted (see below). Any suggestion, help, or clarification? The code is suppose to rename current profile, import another profile, and delete the renamed profile. In essence, the code should reload the profile I have on the server in case my users loose connection to the server and their profiles get scrabbled.


Sub RestoreProfile()
Dim strActiveProfile As String
Dim strMyProfile As String
strMyProfile = "C:\Acadr2009\Profile 2009 LOCAL.ARG"
strActiveProfile = ThisDrawing.Application.Preferences.Profiles.ActiveProfile
With ThisDrawing.Application.Preferences.Profiles
.RenameProfile "Backup Profile 2009 LOCAL" ********This is the code that is highlighted after debugging*********
.ImportProfile strMyProfile, "C:\Acadr2009\Profile 2009 LOCAL.ARG ", True
.ActiveProfile = strMyProfile
.DeleteProfile "Backup Profile 2009 LOCAL"
End With
End Sub

Thanks my fellow ubergeeks!

SF Edited by: SFraz1er on May 11, 2009 1:25 PM
0 Likes
371 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Nevermind... I figured it out... Thanks!
0 Likes