Example form Book
This code is right-out-of-the-book:
(In sheet1 Object module)
Option Explicit
Option Base 1
Dim Sales() As String
Sub CommandButton1_Click()
Static i As Integer
i = i + 1
ReDim Preserve Sales(i)
Sales(i) = InputBox("Sales Figures?")
End Sub
I created using the Control Box a
Command Button with (name) CommandButton1
After I click and enter 123
When I go to the Immediate window and
Enter ? Sales(i) << and return
I get "Compile error"
"Sub or Function not defined"
What's wrong??
TIA,
Jim
|