home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 November
/
Pcwk1197.iso
/
LOTUS
/
Eng-ins
/
ACROREAD
/
SUITE
/
DW05_S2.FRM
< prev
next >
Wrap
Text File
|
1996-11-21
|
6KB
|
236 lines
VERSION 4.00
Begin VB.Form Form1
Caption = "Map Update"
ClientHeight = 4008
ClientLeft = 2292
ClientTop = 2484
ClientWidth = 8280
Height = 4332
Left = 2244
LinkTopic = "Form1"
ScaleHeight = 4008
ScaleWidth = 8280
Top = 2208
Width = 8376
Begin VB.ComboBox Combo1
Height = 315
Left = 720
TabIndex = 1
Top = 120
Width = 615
End
Begin VB.TextBox Text1
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 9.6
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 360
Left = 720
TabIndex = 2
Top = 480
Width = 1215
End
Begin VB.CommandButton Add_To_List
Caption = "Add to List"
Height = 375
Left = 720
TabIndex = 3
Top = 960
Width = 1095
End
Begin VB.CommandButton Update_Map
Caption = "Update Map"
Height = 375
Left = 720
TabIndex = 4
Top = 3480
Width = 1095
End
Begin VB.ListBox List1
Height = 1584
Left = 720
TabIndex = 0
TabStop = 0 'False
Top = 1680
Width = 1212
End
Begin VB.OLE OLE1
Class = "Lotus123.Workbook.97"
Height = 3732
Left = 2160
OleObjectBlob = "DW05_S2.frx":0000
SourceDoc = "C:\WINDOWS\profiles\Default User\Desktop\vb\Dw05_s2.123"
TabIndex = 7
Top = 96
Width = 6012
End
Begin VB.Label Label4
Caption = "Value:"
Height = 255
Left = 120
TabIndex = 6
Top = 480
Width = 615
End
Begin VB.Label Label2
Caption = "State:"
Height = 255
Left = 120
TabIndex = 5
Top = 120
Width = 495
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Private Type myitem
state As String
sales As String
End Type
Dim StateAndSales(50) As myitem
Dim myCount As Integer
Private Sub Command2_Click()
For i = 0 To myCount
OLE1.object.Ranges.Item("A:F" + CStr(i + 2)).contents = StateAndSales(i).state
OLE1.object.Ranges.Item("A:G" + CStr(i + 2)).contents = StateAndSales(i).sales
Next i
End Sub
Private Sub Command3_Click()
If Combo1.Text = "" Then
MsgBox "You must select or enter a state.", , "Sorry!"
Exit Sub
End If
If Text1.Text = "" Then
MsgBox "You must enter a value.", , "Sorry!"
Exit Sub
End If
StateAndSales(myCount).state = Combo1.Text
StateAndSales(myCount).sales = Text1.Text
List2.AddItem (StateAndSales(myCount).state + " at: " + StateAndSales(myCount).sales)
Combo1.Text = ""
Text1.Text = ""
myCount = myCount + 1
End Sub
Private Sub Command4_Click()
MsgBox StateAndSales(0).state
MsgBox StateAndSales(1).state
End Sub
Private Sub Add_To_List_Click()
If Combo1.Text = "" Then
MsgBox "You must select or enter a state.", , "Sorry!"
Exit Sub
End If
If Text1.Text = "" Then
MsgBox "You must enter a value.", , "Sorry!"
Exit Sub
End If
StateAndSales(myCount).state = Combo1.Text
StateAndSales(myCount).sales = Text1.Text
List1.AddItem (StateAndSales(myCount).state + " at: " + StateAndSales(myCount).sales)
Combo1.Text = ""
Text1.Text = ""
myCount = myCount + 1
End Sub
Private Sub Form_Load()
myCount = 0
'Combo1.AddItem ("AK")
Combo1.AddItem ("AZ")
Combo1.AddItem ("AR")
Combo1.AddItem ("CA")
Combo1.AddItem ("CO")
Combo1.AddItem ("CT")
Combo1.AddItem ("DE")
Combo1.AddItem ("FL")
Combo1.AddItem ("GA")
'Combo1.AddItem ("HI")
Combo1.AddItem ("ID")
Combo1.AddItem ("IL")
Combo1.AddItem ("IN")
Combo1.AddItem ("IA")
Combo1.AddItem ("KS")
Combo1.AddItem ("KY")
Combo1.AddItem ("LA")
Combo1.AddItem ("ME")
Combo1.AddItem ("MD")
Combo1.AddItem ("MA")
Combo1.AddItem ("MI")
Combo1.AddItem ("MN")
Combo1.AddItem ("MS")
Combo1.AddItem ("MO")
Combo1.AddItem ("MT")
Combo1.AddItem ("NE")
Combo1.AddItem ("NV")
Combo1.AddItem ("NH")
Combo1.AddItem ("NJ")
Combo1.AddItem ("NM")
Combo1.AddItem ("NY")
Combo1.AddItem ("NC")
Combo1.AddItem ("ND")
Combo1.AddItem ("OH")
Combo1.AddItem ("OK")
Combo1.AddItem ("OR")
Combo1.AddItem ("PA")
Combo1.AddItem ("RI")
Combo1.AddItem ("SC")
Combo1.AddItem ("SD")
Combo1.AddItem ("TN")
Combo1.AddItem ("TX")
Combo1.AddItem ("UT")
Combo1.AddItem ("VT")
Combo1.AddItem ("VA")
Combo1.AddItem ("WA")
Combo1.AddItem ("WV")
Combo1.AddItem ("WI")
Combo1.AddItem ("WY")
Combo1.Text = Combo1.List(0)
End Sub
Private Sub Label1_Click()
End Sub
Private Sub List2_Click()
End Sub
Private Sub Update_Map_Click()
For i = 0 To myCount
OLE1.object.Ranges.Item("A:F" + CStr(i + 2)).contents = StateAndSales(i).state
OLE1.object.Ranges.Item("A:G" + CStr(i + 2)).contents = StateAndSales(i).sales
Next i
End Sub