Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 300
Default Detecting Ctrl-Tabs in User Form input fields?

I have a user that somehow after entering a date in a user form text box
hit Ctrl-Tab a few times. This put some sort of non-prinatble characters
after the input. Then closing the form put the input in a spreadsheet cell
and formulas dependent on this cell errored out. And then macros reading
these errors crashed. Anyway to prevent or detect input like this?

Don <donwiss at panix.com.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Detecting Ctrl-Tabs in User Form input fields?

You can use the Clean function to remove non-printable characters something
like this:

Sheet1.Range("C3").Value = Application.Clean(Sheet1.Range("C2").Value)

This takes the Cell in C2 and removes the non printable characters and
places the resutl in C3

To test it put =CHAR(7) & "Text" in Cell C2...

HTH

"Don Wiss" wrote:

I have a user that somehow after entering a date in a user form text box
hit Ctrl-Tab a few times. This put some sort of non-prinatble characters
after the input. Then closing the form put the input in a spreadsheet cell
and formulas dependent on this cell errored out. And then macros reading
these errors crashed. Anyway to prevent or detect input like this?

Don <donwiss at panix.com.

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
Excel to input fields into a Word Form ArmsteR Excel Worksheet Functions 1 August 3rd 07 09:16 AM
User Input Form Beth[_6_] Excel Programming 2 May 13th 04 01:23 AM
Detecting Input Change on User Form Don Wiss Excel Programming 3 December 2nd 03 02:09 AM
Help with a User Input Form Cody Dawg[_2_] Excel Programming 3 October 9th 03 10:08 PM


All times are GMT +1. The time now is 04:43 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"