Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i link from one work book to another? Leanne D Excel Discussion (Misc queries) 2 January 6th 10 06:35 AM
link to another worksheet in the same work jae Excel Discussion (Misc queries) 5 December 28th 08 09:03 PM
link work books Sue Excel Discussion (Misc queries) 1 March 18th 08 04:28 PM
Formula/Link work-around Ray Excel Discussion (Misc queries) 2 May 30th 07 01:47 PM
How to link a url to the work sheet Igneshwara reddy[_2_] Setting up and Configuration of Excel 0 March 12th 07 05:40 PM


All times are GMT +1. The time now is 06:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"