Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel skip some lines of VBA code

I have some code
that work in debug mode but not work if i run it normaly
(if i run it normaly
excel enter to the if condition only 1 time)

What can i do with it??


Sub FormatNow()
Dim Grow As Long
For Grow = 4 To 31640
If Sheet1.Range(Cells(Grow, 8), Cells(Grow, 8)).Interior.Color =
12648447 Then
'MsgBox Grow
Sheet1.Range(Cells(Grow, "Z"), Cells(Grow, "Z")).Value =
Sheet1.Range(Cells(Grow, 8), Cells(Grow, 8)).Value
'MsgBox Sheet1.Range(Cells(Grow, "Z"), Cells(Grow, "Z")).Value
End If
Next
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Excel skip some lines of VBA code

Name your sheetfully i.e. workbook.sheet
"Alex" wrote in message
...
I have some code
that work in debug mode but not work if i run it normaly
(if i run it normaly
excel enter to the if condition only 1 time)

What can i do with it??


Sub FormatNow()
Dim Grow As Long
For Grow = 4 To 31640
If Sheet1.Range(Cells(Grow, 8), Cells(Grow, 8)).Interior.Color =
12648447 Then
'MsgBox Grow
Sheet1.Range(Cells(Grow, "Z"), Cells(Grow, "Z")).Value =
Sheet1.Range(Cells(Grow, 8), Cells(Grow, 8)).Value
'MsgBox Sheet1.Range(Cells(Grow, "Z"), Cells(Grow, "Z")).Value
End If
Next
End Sub




Reply
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
Looking for code to separate one line of text into multiple lines in Excel [email protected] Excel Worksheet Functions 1 February 13th 07 12:59 AM
how do i comment 1000 lines of code at once in vba for excel? Anne Troy Excel Worksheet Functions 1 July 7th 05 01:39 AM
Code for Inserting Multiple lines Frantic Excel-er Excel Discussion (Misc queries) 0 June 17th 05 06:36 PM
How do I copy cells and skip lines? con_jon Excel Discussion (Misc queries) 1 February 17th 05 09:59 PM
Code Text Into Chart Lines? Phil Hageman Excel Programming 3 July 17th 03 11:51 AM


All times are GMT +1. The time now is 08:17 PM.

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"