Can anyone share a sample application having a macro for default selection.
I want to apply this macro post relaod.
All my objects are in a particular state . Would that affect the macro?
Solved! Go to Solution.
I am very much new to macro.
I mean say in a list box-product .i want to select default value as Product-A.
This list box is in a state -A?
can anyone help me with this macro.
So you are using alternate states in your app?
You can try to to do something like that:
so if i write this macro :
and on post reload ....apply this macro Default.
It should work ?
Does this macro work if you execute it from the modul-editor per click on Test-Button? What is the reason for these selection then normally a reload changed no former selection?
If I have a closer look on your statement I notice the attempt to select this field within a certain state but the APIGuide didn't know such a parameter and I think it made no sense, too then a field is global and only sheets respectively sheet-objects could belong to a state. Further the syntax isn't quite correct then it must be:
ActiveDocument.Fields("MARKETSIZINGV1.PGRP_LVL_1_DESC_TXT", "Explore_OAMS").SelectValues("Prevnar Franchise")