الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

مساعدة في تعديل كود ضروووووي

بدأه awajihm في 30 سبتمبر 2010 · 1 رد · 554 مشاهدة · في لغة Ms Visual Basic 6 وما قبلها من إصدارات
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

لدي كود يقوم بجلب البيانات من موقع تداول القديم

ولكن هذا الكود لايعمل مع الموقع الجديد ولم استطع حل المشكلة

الموقع: http://www.tadawul.com.sa/Resources/...lyList_ar.html

والكود هو

Sub GetRows(strText As String)

Dim strText2 As String

Dim strRows As String

Dim logStart As Long

strText2 = strText

Dim logStart2, logEnd, logCounter As Long

Do While Len(Trim(strText2)) <> 0

logStart = InStr(1, strText2, "<TR")

If logStart = 0 Then Exit Sub

logEnd = InStr(logStart, strText2, "</TR>")

If logEnd = 0 Then Exit Sub

strRows = Trim(Mid$(strText2, logStart, (logEnd - logStart)))

ReDim Preserve strRowsTable(logCounter)

strRowsTable(logCounter) = strRows

logCounter = logCounter + 1

strText2 = Replace(Mid$(strText2, logEnd), vbCrLf, "")

Loop

End Sub

Sub GetItims()

Dim strText2 As String

Dim strItem As String

Dim I As Long

Dim logStart, logStart2, logEnd, logCols As Long

For I = 0 To UBound(strRowsTable)

Flex.rows = UBound(strRowsTable) + 1

strText2 = strRowsTable(I)

logCols = 0

Do While Len(Trim(strText2)) <> 0

logStart = InStr(1, strText2, "<TD")

If logStart = 0 Then Exit Do

logEnd = InStr(logStart, strText2, "</TD>")

If logEnd = 0 Then Exit Do

logStart2 = InStrRev(strText2, ">", logEnd)

If logEnd = 0 Then Exit Do

strItem = Trim(Mid$(strText2, logStart2 + 1, (logEnd - logStart2) - 1))

If strItem = Empty Then

logStart = InStr(1, strText2, "<A")

If logStart = 0 Then Exit Do

logEnd = InStr(logStart, strText2, "</A>")

If logEnd = 0 Then Exit Do

logStart2 = InStrRev(strText2, ">", logEnd)

If logEnd = 0 Then Exit Do

strItem = Trim(Mid$(strText2, logStart2 + 1, (logEnd - logStart2) - 1))

'''''''''''''''''''''''''''''''''''''''''

logStart = InStr(1, strText2, "symbo")

If logStart <> 0 Then

logEnd = InStr(logStart, strText2, ">")

Flex.TextMatrix(I, 0) = Trim(Mid$(strText2, logStart + 7, (logEnd - logStart) - 8))

End If

''''''''''''''''''''''''''''''''''''''''

End If

If Flex.cols <= logCols + 1 Then Flex.cols = logCols + 2

If strItem <> "" Then Flex.TextMatrix(I, logCols + 1) = strItem

logCols = logCols + 1

strText2 = Mid$(strText2, logEnd + 1)

Loop

Next I

End Sub

==============================

الرجاء المساعدة وتحياتي للجميع

#2

الرجاء المساعدة

وتحياتي للجميع

مواضيع مشابهة