Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need code to affect Excel checkbox
Message
 
 
À
26/02/2011 15:04:03
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 7
Database:
Visual FoxPro
Divers
Thread ID:
01501951
Message ID:
01502087
Vues:
95
This message has been marked as the solution to the initial question of the thread.
Try
lcCheckboxName = "Check Box 3"

FOR i=1 TO oSheet.CheckBoxes.Count
	*? i, oSheet.CheckBoxes(i).Name       && Uncomment to see checkbox names
	IF oSheet.CheckBoxes(i).Name = lcCheckboxName
		oSheet.CheckBoxes(i).Value = 1		&& Check
	ENDIF
ENDFOR
>
>I created a macro in Excel to check a checkbox on the worksheet:
>
>oleApp.Run "MyFile.XLS!CheckBox3_Click"
>
>This would work great if I could just plug that in after the condition in my code, except the way it's phrased doesn't play well with VFP. Any suggestions?
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform