Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Control

Status
Not open for further replies.

kiramoto

Programmer
May 13, 2002
9
BR
Hi everybody,

I want to show a preview of my Excel's worksheet in my vb application, using the data control. How can I set dinamically the databasename and the databasesource of the Data Control??
Thanks


 
data1.databasename = whatever

data1.recordsource = whatever

 
I did something like that :


CommonDialog1.ShowOpen
PlanName = CommonDialog1.Filename 'open my worksheet
Data1.DatabaseName = PlanName
Data1.RecordSource = "Plan1"

and there is a MSFLEXGRID which property DataSource = Data1

It doesn't work. Can anyone help me?
Thanks in advance,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top