LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 371
Default Column Limit

Hi
I have a textbox on a form and want the user to input a column header. How
can I prevent the user inputting a value greater than 'IV' ?

Inputting 'K' yields 11 in the test msgbox
Inputting 'KK' gives a 'Type Mismatch' error.

Private Sub txt1_Change()

txt1.Text = UCase(txt1.Text)

''' for syntax testing only
MsgBox Sheets(1).Columns(txt1.Text).Column

If Not Sheets(1).Columns(txt1.Text).Column 256 Then
''' do something
Else
MsgBox "No such column"
End If

End Sub

T.I.A.

Geoff
 
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 limit sorting a column to the column? Pat Excel Worksheet Functions 0 February 9th 06 04:01 PM
Will the column limit be over 256? Han Excel Discussion (Misc queries) 2 June 13th 05 08:15 PM
limit column entries Boenerge Excel Worksheet Functions 4 May 8th 05 08:02 PM
Column limit for exporting FinChase Excel Discussion (Misc queries) 2 February 4th 05 11:05 PM
Column Limit Bryan[_8_] Excel Programming 3 June 18th 04 11:13 PM


All times are GMT +1. The time now is 07:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"