I want my program to read from a label. so that when i click on a button it reads its caption and changes somthing in a modual.
I have this modual
VB Code:
Public Type DataType TodayMonth As String TodayMonthNum As Integer TodayDay As Integer username As String ChosenMonthNum As Integer ChosenMonth As String ChosenDay As Integer TotalUsers As Integer End Type Public Data(0) As DataType
and this is the code inside each button
VB Code:
Dim TodayDate As Integer TodayDate = FriA.Caption Data(0).TodayDay = TodayDate
but when i run the program i get this error.
Run Time Error "424":
Object required
So can anyone see a problem with my code, or is it that you can't read captions this way, and if thats the case how do i read captions?




Reply With Quote