Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 63
Default Error message is Character Limit is over 1024 characters

What I'm trying to do is have a macro to check the certain merged cells for
character limits. If a merged cell is over 1024 characters, I want it to
display an error message. The error message part is fine, it's displaying how
I want. But I can get the If statement to work right. If there is any
characters in the Merged cell it displays the error. The code I've been
trying is below. Any hints or rewrite would appreciated. Thanks

Range B11:H12 is one merged cell, if that helps at all

Txtcll = 1024
Range("B11:H12").Select
If Len(ActiveCell.Value) Txtcell Then
MsgBox ActiveCell.Address + " Contains too many characters,
please copy some of you text to another line."
Exit Sub
End If

Vick
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Error message is Character Limit is over 1024 characters

FWIW, I found this by using Option Explicit before the code. It forces you
to declare all variables.
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Vick" wrote:

What I'm trying to do is have a macro to check the certain merged cells for
character limits. If a merged cell is over 1024 characters, I want it to
display an error message. The error message part is fine, it's displaying how
I want. But I can get the If statement to work right. If there is any
characters in the Merged cell it displays the error. The code I've been
trying is below. Any hints or rewrite would appreciated. Thanks

Range B11:H12 is one merged cell, if that helps at all

Txtcll = 1024
Range("B11:H12").Select
If Len(ActiveCell.Value) Txtcell Then
MsgBox ActiveCell.Address + " Contains too many characters,
please copy some of you text to another line."
Exit Sub
End If

Vick

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Error message is Character Limit is over 1024 characters

You have TxtCll in one place and TxtCell in another???
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Vick" wrote:

What I'm trying to do is have a macro to check the certain merged cells for
character limits. If a merged cell is over 1024 characters, I want it to
display an error message. The error message part is fine, it's displaying how
I want. But I can get the If statement to work right. If there is any
characters in the Merged cell it displays the error. The code I've been
trying is below. Any hints or rewrite would appreciated. Thanks

Range B11:H12 is one merged cell, if that helps at all

Txtcll = 1024
Range("B11:H12").Select
If Len(ActiveCell.Value) Txtcell Then
MsgBox ActiveCell.Address + " Contains too many characters,
please copy some of you text to another line."
Exit Sub
End If

Vick

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
how do i get a cell in a sheet to show the last 1024 characters? XenneX Excel Worksheet Functions 1 September 6th 06 02:02 PM
Character limit when printing Neil Conduit Excel Discussion (Misc queries) 1 June 1st 06 01:54 PM
Text box character limit Mickey Excel Discussion (Misc queries) 0 May 22nd 06 08:30 PM
255 Character Limit Colin Excel Discussion (Misc queries) 2 March 2nd 06 07:58 PM
Display text 1024 characters in a cell Martin Excel Worksheet Functions 6 November 12th 05 11:25 PM


All times are GMT +1. The time now is 08:49 AM.

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"