Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
I am creating an export from qlikview to PowerPoint.
One of those ppt will be having over 40 slides, each of them will be exactly the same just filtered by different country.
Is there any way to write a Sub and use a country name as parameter and then just call that sub ?
the trouble I have is that if I have following Sub:
sub CreateCountry(slide_nr, CountryName)
Set PPSlide = PPPres.Slides(n)
set s=ActiveDocument.Sheets("SH11")
ActiveDocument.Sheets("SH11").Activate
ActiveDocument.GetApplication.WaitForIdle
Activedocument.fields("Country Project").select "CountryName"
ActiveDocument.GetSheetObject("CH09").CopyBitmapToClipboard
PPSlide.Shapes.Paste
call Fix_Picture_Size(0.49,0.1,0.4,0.2,PPSlide.Shapes(PPSlide.Shapes.Count),PPSlide.Master.Width)
Activedocument.fields("Country Name").Clear
End Sub
And then I call this Sub:
call CreateCountry(1, "United Kingdom")
It doesn't work...
Any ideas what I got wrong?
Thanks
Thank you for your response.
Did as you advice:
public function CreateCountry(slide_nr, CountryName)
...
End function
and called with variables, as you suggested and still the same...
Not sure why it is doing it - do you have any other suggestions?
I think the reason aren't the call or the parameters - something else caused this error. I suggest you put some msgbox into the script to find out until which point the routine(s) runs.
- Marcus