Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Hayfa Khan   on Aug 10 In MS Office Category.

  
Question Answered By: Lucio Ferrrari   on Aug 10

Here is some VBA code I found on the Internet to go thru all objects within each
Frame

Private Sub UserForm_Click()
Dim cCont As Control
Dim lCount As Long
On Error Resume Next

Cells(1, 1) = "NAME"
Cells(1, 2) = "TAB INDEX"
Cells(1, 3) = "TAB STOP"

lCount = 3
For Each cCont In Me.Frame1.Controls
lCount = lCount + 1
Cells(lCount, 1) = cCont.Name
Cells(lCount, 2) = "TabIndex=" & cCont.TabIndex
Cells(lCount, 3) = cCont.TabStop
Next cCont

For Each cCont In Me.Frame2.Controls
lCount = lCount + 1
Cells(lCount, 1) = cCont.Name
Cells(lCount, 2) = "TabIndex=" & cCont.TabIndex
Cells(lCount, 3) = cCont.TabStop
Next cCont

For Each cCont In Me.Frame3.Controls
lCount = lCount + 1
Cells(lCount, 1) = cCont.Name
Cells(lCount, 2) = "TabIndex=" & cCont.TabIndex
Cells(lCount, 3) = cCont.TabStop

Next cCont
End Sub

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on How to prevent (TabKey) going to a command button ? Or get search suggestion and latest updates.


Tagged: