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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
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

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

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

should work

View solution in original post

2 Replies
Clever_Anjos
Employee
Employee

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

should work

fcecconi
Partner - Creator III
Partner - Creator III
Author

Thanks!  It works now