Writing code to objects within MultiPage object

T

T2B

Design Mode of a worksheet (Excel 2003) I
Rightclick Multipage Object (MultiPage1) and select edit
Insert a textbox onto Page1
Rename textbox1 to txtArrivalDate

Two problems I have. One, after the text box is created I cannot
access the properties again. How is this done?

Two, how do I refer to this textbox in code and write code to its
events? How do I know what events the object has? I am accustomed to
Access forms in which the events to an object are easy to find and
write event handlers for.
 
M

mp

Design Mode of a worksheet (Excel 2003) I
Rightclick Multipage Object (MultiPage1) and select edit
Insert a textbox onto Page1
Rename textbox1 to txtArrivalDate

Two problems I have. One, after the text box is created I cannot
access the properties again. How is this done?

Two, how do I refer to this textbox in code and write code to its
events? How do I know what events the object has? I am accustomed to
Access forms in which the events to an object are easy to find and
write event handlers for.

I've never used a multi-page, or any controls for that matter in an
excel sheet, usually use vb or vba to create forms. But since no one
answered you, I put one on a worksheet and put a text box on page1.
I get the properties window no problem. just put cursor inside one of
the controls- multipage or text box and right click properties comes up
if you have properties window up and move cursor to the other control
and click the properties for that control appear in the properties window

as far as referencing the textbox, usually I'd just do something like
Dim oTxtBox (or whatever) as TextBox
Set oTxtBox = txtArrivalDate

you should be able to select txtArrivalDate
in one of the drop down windows at top of vba window, then the events
will be shown in the other dropdown that correspond to that object.
Hope that helps
Mark
 
M

mp

Design Mode of a worksheet (Excel 2003) I
Rightclick Multipage Object (MultiPage1) and select edit
Insert a textbox onto Page1
Rename textbox1 to txtArrivalDate

Two problems I have. One, after the text box is created I cannot
access the properties again. How is this done?

Two, how do I refer to this textbox in code and write code to its
events? How do I know what events the object has? I am accustomed to
Access forms in which the events to an object are easy to find and
write event handlers for.

also just selecting the objects (worksheet, multipage, textbox) in top
left drop down, will also create a stub for the selected event(whatever
is showing in top right dropdown) for that control
Private Sub MultiPage1_Change()

End Sub

Private Sub txtArrivalDate_Change()

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top