Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
fcecconi
Partner - Creator III
Partner - Creator III

Macro Help

I could use some help with my macro.  I am trying to set one object = another object and then jump to a new sheet

sub SelectCoContributor

        vCurrSheet = ActiveDocument.ActiveSheet.GetProperties.SheetId

      if vCurrSheet = "Document\SHCPDetails" then

            set vCoContributor = ActiveDocument.Fields("CO_CONTRIBUTOR_Name").GetPossibleValues

                  if vCoContributor.Count = "1" then

            ActiveDocument.Fields("CONTRIBUTOR_NAME").Value= ActiveDocument.Fields("CO_CONTRIBUTOR_NAME").Value

                    ActiveDocument.Fields("CONTRIBUTOR_NAME").SelectPossible

                    ActiveDocument.Fields("CO_CONTRIBUTORIMAGE").Clear

                      ActiveDocument.ActivateSheet "SHCP"

                End If

      End If

end sub

The BOLD RED line is where my macro is failing.  I could use a trigger to do the same function, but I need to call this macro several times

Thanks for you help!


Frank

Labels (1)
1 Solution

Accepted Solutions
Clever_Anjos
Support
Support

ActiveDocument.Fields("CONTRIBUTOR_NAME").Select  vCoContributor(0).Text

should work

View solution in original post

2 Replies
Clever_Anjos
Support
Support

ActiveDocument.Fields("CONTRIBUTOR_NAME").Select  vCoContributor(0).Text

should work

fcecconi
Partner - Creator III
Partner - Creator III
Author

Thanks!  It works now