PC Review


Reply
Thread Tools Rate Thread

Code causes a problem

 
 
Patrick C. Simonds
Guest
Posts: n/a
 
      5th Oct 2009
I am totally stumped here. My code below crashes Excel and I can not
figure out why. To be more specific it is only the next to last line that
causes the problem (if I remove it I have no problem), and more
interestingly, it is only after you close Excel and restart that I have the
problem. Is there something that I am missing




If rMyCount < 2 Then
Frame1001.Visible = False
End If

If rMyCount < 3 Then
Frame2001.Visible = False
End If

If rMyCount < 4 Then
Frame3001.Visible = False
End If

If rMyCount < 5 Then
Frame4001.Visible = False
End If

If rMyCount < 6 Then
Frame5001.Visible = False
End If

If rMyCount < 7 Then
Frame6001.Visible = False
End If

If rMyCount < 8 Then
Frame7001.Visible = False
End If

If rMyCount < 9 Then
Frame8001.Visible = False
End If

If rMyCount <> 10 Then
Frame9001.Visible = True
End If

 
Reply With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      5th Oct 2009
As a stand alone statement, it should not be a problem. But it could cause
a problem if elsewhere in the code there is something that conflicts with
the logic of it.



"Patrick C. Simonds" <(E-Mail Removed)> wrote in message
news6EDE608-4B20-409A-9957-(E-Mail Removed)...
> I am totally stumped here. My code below crashes Excel and I can not
> figure out why. To be more specific it is only the next to last line that
> causes the problem (if I remove it I have no problem), and more
> interestingly, it is only after you close Excel and restart that I have
> the problem. Is there something that I am missing
>
>
>
>
> If rMyCount < 2 Then
> Frame1001.Visible = False
> End If
>
> If rMyCount < 3 Then
> Frame2001.Visible = False
> End If
>
> If rMyCount < 4 Then
> Frame3001.Visible = False
> End If
>
> If rMyCount < 5 Then
> Frame4001.Visible = False
> End If
>
> If rMyCount < 6 Then
> Frame5001.Visible = False
> End If
>
> If rMyCount < 7 Then
> Frame6001.Visible = False
> End If
>
> If rMyCount < 8 Then
> Frame7001.Visible = False
> End If
>
> If rMyCount < 9 Then
> Frame8001.Visible = False
> End If
>
> If rMyCount <> 10 Then
> Frame9001.Visible = True
> End If



 
Reply With Quote
Reply

Thread Tools
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with code (error code 9) Vince Microsoft Excel Programming 3 12th Oct 2009 04:16 PM
VBA problem w Layout Reset. Manually stepped code gives good result. Run code doesn't work! Bob Microsoft Powerpoint 3 6th Nov 2008 09:17 PM
HREF ASP code problem - what's wrong with this code.... =?Utf-8?B?TWljaw==?= Microsoft Frontpage 3 14th Nov 2005 01:53 PM
Problem getting cookie from code-behind (worked in code-beside) Alan Silver Microsoft ASP .NET 1 15th Sep 2005 06:23 PM
[New] Zipoid - ZIP Code, City Name and Area Code Lookup - Zip Code to Zip Code Distance Calculation Mel Freeware 0 22nd Jul 2005 04:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:15 PM.