Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everbody,
Is it possible to write monthly one table to one excel-file with one sheet for one month?
For example, the script runs at 01.01.2012 and creates an Excel-file where in the first sheet the table was exported.
On 01.02.2012 the script runs again and export the table in the Excel-File from january in the second sheet, and so on.
Is it possible?
Regards vicky
Hi Vicky,
I have been on vacation, so thats why the late reply.
At first I did not understand, but now I see that you are comparing my macro with the macro by Ashok.
In Ashoks macro you are refering to the line:
Set strMonth = ActiveDocument.Fields("Month").GetPossibleValue(totBranch)
and you compare it to the line in my macro:
Set MonthField = ActiveDocument.Fields("Month").GetPossibleValues(12)
I don't know what totBranch comes from since it is not defined in his macro. The result is therefore comparable to just writing
Set strMonth = ActiveDocument.Fields("Month").GetPossibleValue()
The difference in writing
1) GetPossibleValue()
2) GetPossibleValue(12)
3) GetPossibleValue(1923)
is that Qkliview will fetch
1) All possible values
2) Max 2 possible values
3) Max 1923 possible values.
And you can also write it like this:
whatever=10
GetPossibleValue(whatever)
Which will get max 10 possible values, since the variable whatever is equal to 10.
if you write like this:
GetPossibleValue(anything)
and never define "anything" it will be like writing
GetPossibleValue()
Which is the same as getting all possible values.
Hop this helps.
Best Regards
Robert
Hi Robert,
Hope you enjoined your vacations
Thanks for your explanation. Now I'm understanding the macro better. Hope I will keep it in mind for the next time
Have a nice day
Best Regards
Vicky