Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old May 3rd, 2005, 6:46 AM   #1
crmpicco
Newbie
 
Join Date: Feb 2005
Posts: 13
Rep Power: 0 crmpicco is on a distinguished road
ASCII conversion loop difficulty

I am having a problem with my ASCII conversion and having these values inside a loop.

The values start out below as:

tempCol = 67 (which is the ASCII value for 'C')
iTotalCols = 46 (which is the number of columns I have in the sheet)
iColour is just a Integer

The problem i am experiancing is that when the loop gets to 91, which is [ (left/opening bracket) - i get an error.

How can i stop this?



I have this loop structure:


For n = tempCol To iTotalCols + 64
sRange = Chr(n) & m
If Trim$(Range(sRange).Text) <> "" Then
Range(sRange).Interior.ColorIndex = iColour
End If
Next n



Thanks.

Picco
crmpicco is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:51 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC