Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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
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.
Hi,
Meaning if the Variable is empty then you want to delete the BookMark ABC..?
Please describe in detail.
Regards,
Kaushik Solanki
- 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.
- In the above image now i can able to see ABC. I want to see here only the BookMarkNames created by User only.
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
Can you give macro code to delete the bookmarkname with ABC.
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
It is not working kaushik. I'm attaching qvw file can plz go through it
kaushik it is working with this code..
Sub RemoveBookMK
ActiveDocument.RemoveDocBookmark "ABC"
End Sub