LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Compile Error: Loop without Do


I keep getting the following error "Compile Error: Loop without Do"

I am checking to see if A13 is empty if it is then enter the value in
txtorganization in cell A13 then end loop else increase cellposition by
1 and repeat the process...

any ideas how to solve this error??

Private Sub cmdInsert_Click()
Dim CellPosition, counter

counter = 1
CellPosition = a13
Do While counter <= 10
If [CellPosition].Value = " " Then
[CellPosition].Value = txtOrganization.Value
Exit Do
Else
CellPosition = a13 + 1
counter = counter + 1
Loop
End Sub


--
cedtech23
------------------------------------------------------------------------
cedtech23's Profile: http://www.excelforum.com/member.php...o&userid=31022
View this thread: http://www.excelforum.com/showthread...hreadid=507400

 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
VBAProject name compile error, not defined at compile time Matthew Dodds Excel Programming 1 December 13th 05 07:17 PM
Compile error: Loop WIthout Do darin kelberlau Excel Programming 1 November 18th 05 05:48 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


All times are GMT +1. The time now is 06:57 PM.

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

About Us

"It's about Microsoft Excel"