LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default for Looping in VBA/Form

I have many areas of code that could be cleaned if I only knew how
I think it would be a "For" statement in both cases
example 1
Pax1.Caption = Range("d5")
Pax2.Caption = Range("d6")
Pax3.Caption = Range("d7")
etc
example 2
TextBox31.Visible = False
TextBox32.Visible = False
TextBox33.Visible = False

I tried this

For i = 1 To 6

Seat " & i &.Caption = Range(""a" & i + l2 & """)"
next i

with no luck, I get a compile error highlighting "Seat"

Many thanks for any help
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"