Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ADO Link does not work...help
Hi
Could someone look at my code and let me know what I am doing wrong... Thank Jaim Option Explici Public Sub GetPartNumbers( Dim myConn As ADODB.Connectio Dim myRs As ADODB.Recordse Dim selVal As Strin Dim selRow As Intege Set myConn = New ADODB.Connectio myConn.ConnectionString = "Provider=IBMDA400;Data Source=xxx.xxx.x.x;User id=xxxxx;Password=xxxxx; myConn.Ope Set myRs = New ADODB.Recordse Dim R As Rang Set R = Selection(1) 'cell as range that was clicked o If Intersect(R, Range("B14:B24")) Is Nothing The MsgBox "You are not in Range (""B14:B24"") Exit Su End I selVal = Val(R.Value) 'Returned the number in the cell associate If selVal = 0 The MsgBox "Select a Part Number then click on Get Part Number Command Button Exit Su End I myRs.Open "QS36F/PARTDESC/setvar((&PARTNO " & selVal & "))", myCon If myRs.RecordCount 0 The R.CopyFromRecordset myR Els R.Offset(0, 2).Value = "No Records Returned End I End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do i link from one work book to another? | Excel Discussion (Misc queries) | |||
link to another worksheet in the same work | Excel Discussion (Misc queries) | |||
link work books | Excel Discussion (Misc queries) | |||
Formula/Link work-around | Excel Discussion (Misc queries) | |||
How to link a url to the work sheet | Setting up and Configuration of Excel |