Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need code to affect Excel checkbox
Message
 
 
To
26/02/2011 15:04:03
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 7
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01501951
Message ID:
01502087
Views:
94
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform