Problem with code being 'truncated'

Mudface

MrExcel MVP
Joined
Feb 18, 2002
Messages
3,339
Strange one- the code posted between the
Code:
 tags in the post below was truncated: -

[url]http://www.mrexcel.com/board/viewtopic.php?topic=23596&forum=2&7[/url]
 
Mudface, I don't see the "truncation" of the code... at least not in the second link you posted... looks very similar (Didn't check the first one)
 
Same here. I don't notice anything missing either, Mudface. I checked both threads you posted, and everything seems fine to me. What are you looking for/seeing (or not)?
 
It's the cell addresses that are being shortened. For example in the first post "$A$7" (or whatever) was being shortened to "$A" when placed between code tags. I've copied and pasted the code directly from that post and put in comments where the code was 'truncated': -

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Flag As Boolean

With Target
If .Count <> 1 Then Exit Sub
Select Case .Address
Case Is = "$A" ' Should be "$A$7"
If .Value = "" Then Flag = True
Sheet1.Columns("K").Hidden = Flag
Sheet2.Columns("P").Hidden = Flag

Case Is = "$A" ' Should be "$A$7"
If .Value = "" Then Flag = True
Sheet1.Columns("L").Hidden = Flag
Sheet2.Columns("Q").Hidden = Flag
End Select
End With

End Sub


A similar thing happens with my code in the second post, with each cell address apparently losing it's row reference.
 
As a further example, I've copied the code directly below and placed code tags around it, note what happens:-

If c.Address <> "$A$6" Then Exit Sub

With code tags: -

Code:
If c.Address <> "$A" Then Exit Sub
 
Maybe it's the code tag itself?

Trying the same line with the PRE tag instead:<PRE>If c.Address<> "$A$6" Then Exit Sub</PRE>

Now, trying with code tag:

Code:
If c.Address<> "$A" Then Exit Sub

Well huh. Look at that. Seems to just be the code tag doing it. I tend to use the PRE html tag anyway, as it's a bit easier to read.
This message was edited by Von Pookie on 2002-10-02 09:07
This message was edited by Von Pookie on 2002-10-02 09:08
 

Forum statistics

Threads
1,214,829
Messages
6,121,827
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top