Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
amit_saini
Honored Contributor III

Macro correction help!

Hi Folks,

Please help me with syntax error.

Thanks,

AS

1 Solution

Accepted Solutions

Re: Macro correction help!

Amit,

Check the attachment.

2 Replies

Re: Macro correction help!

Amit,

Check the attachment.

sasiparupudi1
Honored Contributor III

Re: Macro correction help!

Hi

Remove the spaces in your code where you use _

Sub SetColorPrefs()

Dim UserPrefs

set UserPrefs = _

ActiveDocument.GetApplication.GetUserPreferences

' Set the "Selected" Color

UserPrefs.CustomSelBgColor(1).PrimaryCol.Col = _

RGB (0,0,255) ' Blue

UserPrefs.CustomSelFgColor(1).PrimaryCol.Col = _

RGB (255,255,0) ' Yellow

' Set the "Possible" Color

UserPrefs.CustomSelBgColor(2).PrimaryCol.Col = _

RGB (255,255,0) ' Yellow

UserPrefs.CustomSelFgColor(2).PrimaryCol.Col = _

RGB (0,0,0) ' Black

' Set the Excluded Color

UserPrefs.CustomSelBgColor(5).PrimaryCol.Col = _

RGB (200,200,200) ' Light gray

UserPrefs.CustomSelFgColor(5).PrimaryCol.Col = _

RGB (0,0,0) ' Black

' Set the Locked Color

UserPrefs.CustomSelBgColor(0).PrimaryCol.Col = _

RGB (255,0,0) ' Red

UserPrefs.CustomSelFgColor(0).PrimaryCol.Col = _

RGB (0,0,0) ' Black

ActiveDocument.GetApplication.SetUserPreferences _

UserPrefs

end sub

hope this helps

Community Browser