View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default For Each...Loop using Pages in a Multipage Control

yes, then you'd have to specify what pg is, i.e., what type of
control. well, wait a minute, what difference does it make if it
disables all the controls on the page if the page itself is disabled?
if the whole page is disabled you won't be able to use anything on the
page anyway.

i guess your way is better for you if it does what you want it to!
:)
susan


On Jul 1, 3:28*pm, RyanH wrote:
Ooops! *No can do. *I just realized that Dim pg as Control disables all the
controls in the page. *I guess I will have to do this below. *I figured I'd
just use the For Each Loop

* * 'disables all three pages
* * * * For i = 0 To 2
* * * * * * mpgIllumination.Pages(i).Enabled = False
* * * * Next i
--
Cheers,
Ryan



"Susan" wrote:
try


dim page as control


:)
susan


On Jul 1, 2:52 pm, RyanH wrote:
I am scattered today. *Yesterday this code was working fine and today it is
not. *I am getting a Type MisMatch Error indicated below, why?


Private Sub cboIllumination_Change()


Dim pg As Page


* * 'disables all three pages
* * * * For Each pg In mpgIllumination.Pages
* * * * * * pg.Enabled = False
* * * * Next pg


End Sub


--
Cheers,
Ryan- Hide quoted text -


- Show quoted text -