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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jagannalla
Partner - Specialist III
Partner - Specialist III

How to delete created bookmark?

Hi,

- I've created a bookmark by using a variable in button action.

For Eg:

In button action CreateBookMark and BookMarkID= BMo2, BookMarkName = vBookVar.

- And also i've BookMarkObject in my sheet by using this i can able to see all bookmarks i created and also i can able to delete bookmarks which i created previously by using Remove BookMark Option.

- But if i've given BookMarkName as ABC in button action i don't want to see this BookMarkName in BookMarkObject.

How can I delete BookMark which is with name ABC.

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Here is the macro to delete the book,ark with name ABC.

   ActiveDocument.RemoveUserBookmark "ABC"

   Make sure that the ABC is in same case.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

16 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   What do you mean by "you dont want to see this BookMarkName in BookMark Object"

   Is this mean that you want to delete the BookMark Or you mean that you want the bookmark but you dont want to show that in BookMarkObject.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jagannalla
Partner - Specialist III
Partner - Specialist III
Author

Sorry for the late reply...

- Actually i'm creating bookmarkname by default with ABC if there is no name for the variable. I don't want to see this bookmarkname in BookMarkObject. If possible delete only this bookmark every time. But i can able to see all bookmarks except ABC.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Meaning if the Variable is empty then you want to delete the BookMark ABC..?

   Please describe in detail.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jagannalla
Partner - Specialist III
Partner - Specialist III
Author

Capture.PNG

- OnActive Sheet i written a trigger to assign a value to this variable with name ABC.

- When user  clicks the button i written a action for this variable to become empty so that the user can able to give      his own name.

- In the above picture i did like this if user clicks the button den only the input box visible to him. And the user        enters the new query name(i.e vBookName = FirstBookMark).

- For next time when user comes to this sheet i don't want to see the default value " ABC " in BookMarkObject.

Capture1.PNG

- In the above image now i can able to see ABC. I want to see here only the BookMarkNames created by User only.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Then i think you should give one more action on button.

   I am assuming that you are creating a bookmark with macro. and you have given action on button to run this macro.

   Then add one more action to this button after running the macro action. i.e to delete the bookmark with name ABC.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jagannalla
Partner - Specialist III
Partner - Specialist III
Author

Can you give macro code to delete the bookmarkname with ABC.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Here is the macro to delete the book,ark with name ABC.

   ActiveDocument.RemoveUserBookmark "ABC"

   Make sure that the ABC is in same case.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jagannalla
Partner - Specialist III
Partner - Specialist III
Author

It is not working kaushik. I'm attaching qvw file can plz go through it

jagannalla
Partner - Specialist III
Partner - Specialist III
Author

kaushik it is working with this code..

Sub RemoveBookMK

   ActiveDocument.RemoveDocBookmark "ABC"

End Sub