Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to store Excel Combobox1_Change() value to spec.Range
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
How to store Excel Combobox1_Change() value to spec.Range
Divers
Thread ID:
01491623
Message ID:
01491623
Vues:
568
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
Répondre
Fil
Voir

Click here to load this message in the networking platform