ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 12th, 2009, 02:01 PM
ch4nk1ngm1ng ch4nk1ngm1ng is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Posts: 1 ch4nk1ngm1ng User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 24 m 42 sec
Reputation Power: 0
ASP 1.0 - Color rows

I hope this is a simple macro; but how do I write a VBA program so on an entire sheet it will shade in grey every 5th row of the sheet?

Reply With Quote
  #2  
Old March 19th, 2009, 10:59 PM
Nilpo's Avatar
Nilpo Nilpo is offline
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Location: New Springfield, OH
Posts: 154 Nilpo User rank is Private First Class (20 - 50 Reputation Level)Nilpo User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 18 h 1 m 47 sec
Reputation Power: 12
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
Facebook MySpace Orkut
Are you trying to do this in ASP or VBA?
__________________
Don't like me? Click it.

Scripting problems? Windows questions? Ask the Windows Guru!

Stay up to date with all of my latest content. Follow me on Twitter!

Help us help you! Post your exact error message with these easy tips!

Reply With Quote
  #3  
Old July 15th, 2009, 12:25 AM
Nilpo's Avatar
Nilpo Nilpo is offline
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Location: New Springfield, OH
Posts: 154 Nilpo User rank is Private First Class (20 - 50 Reputation Level)Nilpo User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2Folding Points: 600856 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 18 h 1 m 47 sec
Reputation Power: 12
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
Facebook MySpace Orkut
Since the OP never returned, I'll post this solution for our Google friends.

The easiest way to change every Xth item in a series in both ASP and VBA is to use VBScript's (VBA's) Mod function.

To change every other row in a table, try something like this.
asp Code:
Original - asp Code
  1. <%
  2. For i = 0 to UBound(arrItems)
  3.     If i Mod 2 = 0 Then ' Every second row
  4.         Response.Write "<tr class=""row2"">..."
  5.     Else                     ' Every first row
  6.         Response.Write "<tr class=""row1"">..."
  7.     End If
  8. Next
  9. %>
The same can be applied to every 5th row by changing the If statement.
asp Code:
Original - asp Code
  1. <%
  2. For i = 0 to UBound(arrItems)
  3.     If i Mod 5 = 0 Then ' Every fifth row
  4.         Response.Write "<tr class=""alternate"">..."
  5.     Else                     ' Every other "normal" row
  6.         Response.Write "<tr>..."
  7.     End If
  8. Next
  9. %>

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > ASP 1.0 - Color rows


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap