Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to write a macro to set the sheet name.
Somthing like this:
If SheetName = A then
vsht = A
If SheetName = B then
vsht = B
If SheetName = C then
vsht = C
but i am unable to to refer sheet name in Macro.
please tell me correct code to access sheet id or name in macro.
Thanks in advance.
Marcel Olmo wrote:
Hey Darius, thanks for your contribution.
May I ask you what if I want to know the list of all the id's of all the sheets? Is that possible?
I just want to loop over all the sheets in one macro, and first of all, I have to get how can I do that. Am I right?
Thanks in advance!!<div></div>
you can use this code as your basis:
sub LoopSheet
for i = 0 to ActiveDocument.NoOfSheets - 1
set ss= ActiveDocument.GetSheet(i)
msgbox(ss.GetProperties.SheetId)
next
end sub
Hi
You could get name or ID of active sheet using following expression
ActiveDocument.ActiveSheet.GetProperties.Name
ActiveDocument.ActiveSheet.GetProperties.SheetId
Look at ApiGuide.qvw for more infoemation. It should be in c:\Program Files\QlikView\Documentation folder if you installed full set of QlikView features.
Cheers
Darius
Hey Darius, thanks for your contribution.
May I ask you what if I want to know the list of all the id's of all the sheets? Is that possible?
I just want to loop over all the sheets in one macro, and first of all, I have to get how can I do that. Am I right?
Thanks in advance!!
Marcel Olmo wrote:
Hey Darius, thanks for your contribution.
May I ask you what if I want to know the list of all the id's of all the sheets? Is that possible?
I just want to loop over all the sheets in one macro, and first of all, I have to get how can I do that. Am I right?
Thanks in advance!!<div></div>
you can use this code as your basis:
sub LoopSheet
for i = 0 to ActiveDocument.NoOfSheets - 1
set ss= ActiveDocument.GetSheet(i)
msgbox(ss.GetProperties.SheetId)
next
end sub
Thank you very much mOngkz
that was what I was looking for.
See you around!!
Hello
If anyone knows, please tell me.
How to find out the REAL number of sheets of Document;
I opened a topic for it.
http://community.qlik.com/forums/p/41098/162300.aspx # 162300
Thank!
Olá
Se alguem souber, me diga por favor.
Como descobrir o real numero de sheets do documento;
Abri um tópico pra isso.
http://community.qlik.com/forums/p/41098/162300.aspx#162300
Obrigado!