raj2000
Aug 4th, 2000, 03:29 AM
Hi,
I would like some help with the following, as I am getting into vbscript deeper, there does not seem to be any good resources to help me find if, what I am doing is correct.
This is what I am trying to do and the coding I have done is as follows:-
I have the following data , a position on a map can appear in more than one place.
I have setup the following data as an array, but as I am new to vbscript, I am not sure if I have setup
have setup the array correctly.
These are the variables I want in the array.
Lat
Lon
Page
XCur
YCur
Col
Row
vbCfrl
svalue
Topleftx
Toplefty
brightx
brighty
'next, remove all of the carriage returns and line feeds
ReStr = Replace(ReStr, vbCfrl, "")
'split the string into an array at each comma
arrWork1 = Split(ReStr, ",")
For i = LBound(arrWork1) to UBound(arrWork1)
arrWork2 = Split(arrWork1(i), "=", 2)
sValue = Trim(arrWork2(UBound(arrWork2)))
Select Case Trim(arrWork2(LBound(arrWork2)))
Case "Map"
Map = sValue
Case "MapO"
MapO = sValue
Case "Lat1"
Lat1 = sValue
Case "Lat2"
Lat2 = sValue
Case "Lat3"
Lat3 = sValue
Case "Lat4"
Lat4 = sValue
Case "Lon1"
Lon1 = sValue
Case "Lon2"
Lon2 = sValue
Case "Lon3"
Lon3 = sValue
Case "Lon4"
Lon4 = sValue
Case "Page"
Page = sValue
Case "XCur"
XCur = sValue
Case "YCur"
YCur = sValue
Case "Col"
Col = sValue
Case "Row"
Row = sValue
End Select
Erase arrWork2 ' clear the array
next
Erase arrWork1 ' clear the array
I need to be able to retrieve the place if it occurs on more than page on a map.
Any ideas on how to setup the array correctly kindly appreciated.
Please help
I would like some help with the following, as I am getting into vbscript deeper, there does not seem to be any good resources to help me find if, what I am doing is correct.
This is what I am trying to do and the coding I have done is as follows:-
I have the following data , a position on a map can appear in more than one place.
I have setup the following data as an array, but as I am new to vbscript, I am not sure if I have setup
have setup the array correctly.
These are the variables I want in the array.
Lat
Lon
Page
XCur
YCur
Col
Row
vbCfrl
svalue
Topleftx
Toplefty
brightx
brighty
'next, remove all of the carriage returns and line feeds
ReStr = Replace(ReStr, vbCfrl, "")
'split the string into an array at each comma
arrWork1 = Split(ReStr, ",")
For i = LBound(arrWork1) to UBound(arrWork1)
arrWork2 = Split(arrWork1(i), "=", 2)
sValue = Trim(arrWork2(UBound(arrWork2)))
Select Case Trim(arrWork2(LBound(arrWork2)))
Case "Map"
Map = sValue
Case "MapO"
MapO = sValue
Case "Lat1"
Lat1 = sValue
Case "Lat2"
Lat2 = sValue
Case "Lat3"
Lat3 = sValue
Case "Lat4"
Lat4 = sValue
Case "Lon1"
Lon1 = sValue
Case "Lon2"
Lon2 = sValue
Case "Lon3"
Lon3 = sValue
Case "Lon4"
Lon4 = sValue
Case "Page"
Page = sValue
Case "XCur"
XCur = sValue
Case "YCur"
YCur = sValue
Case "Col"
Col = sValue
Case "Row"
Row = sValue
End Select
Erase arrWork2 ' clear the array
next
Erase arrWork1 ' clear the array
I need to be able to retrieve the place if it occurs on more than page on a map.
Any ideas on how to setup the array correctly kindly appreciated.
Please help