Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to store Excel Combobox1_Change() value to spec.Range
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
How to store Excel Combobox1_Change() value to spec.Range
Miscellaneous
Thread ID:
01491623
Message ID:
01491623
Views:
567
Hi All,

I've a below codes and i can create combox object and fill it with Cursor Value (CboDay1.MyValue)
and now i want add more control to the combobox so ,

how can i assign combobox selected value to the specified range ? i found below codes
Option Explicit

Private Sub ComboBox1_Change()
Range("A1").Value = Range("a1").Value + ComboBox1.Value 

End Sub
which is used in VBA but i've no idea that how to convert its to VFP codes
*- part of excel automation codes
	oExcel.Range("B4").Select
	*- oexcel.ActiveSheet.DropDowns.Add(50,3,40,10).Select && (Left,Top,Width,Height)
        *- thanks to Yuri Rubinov for adding combobox codes
	loCbo1 = oExcel.ActiveSheet.Oleobjects.Add("Forms.ComboBox.1",,,,,,,50,115,45,13).Object
	Select CboDay1
	With loCbo1
		Do While .ListCount > 0
			.RemoveItem (0)
		Enddo
		Scan
			.AddItem(Alltr(CrsDay1.MyValue))
		Endscan
	Endwith
TIA
Reply
Map
View

Click here to load this message in the networking platform