2 Replies Latest reply: Apr 29, 2010 4:52 PM by Sarah Jenson RSS

    Sheet Macros

      I'm trying to set a macro so that when opening a sheet two options from the "Cateogory" field are selected. I'm not sure about the QlikView script to do so. Below is an example that I've tried that does not work. Any help is very much appreciated!

       

       

       

       



       

       

       

       

       

       

       

       



       

       

       

      Sub

       

      SetPain_Communication

       

       

       

       

       

       

       





       

      ActiveDocument.Fields("Category").Select("Pain")

      AND

      ActiveDocument.Fields("Category").Select("Communication")



       

       

       

       

       



      endsub

       

       



       

       

       

       

       

       



        • Sheet Macros
          Neil Miller

          Is your macro triggering properly, but only leaving you with Communication selected? The Select function makes the value passed the one and only selection when used.

          You need:

          ActiveDocument.Fields("Category").Select("Pain")
          ActiveDocument.Fields("Category").ToggleSelect("Communication")


          That should make Pain the only selected value and then also select Communication. You are left with both Pain and Communication selected.