Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default clear textbox contents

I have a text box on a worksheet used to accept a username input. I would
like to automatically clear the textbox contents when the user logs out but
can't seem to figure out how... Any ideas?

thanks,

Dan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default clear textbox contents

assuming the textbox is on Userform1

Userform1.Textbox1.Text = ""

if the textbox is a control toolbox toolbar textbox on a worksheet

worksheets("Sheet1").OleObjects("Textbox1").Object .Text = ""

or
sheet1.Textbox1.Text = ""


if a Textbox from the drawing toolbar on a worksheet

worksheets("sheet1").Textboxes("Text Box 1").Value = ""

--
Regards,
Tom Ogilvy

dirt wrote in message
.. .
My apologies - I wasn't that clear.
I have a limited access file - the user inputs their name into the text

box
and I run a verification program to allow the user to edit the file. If

the
user name doesn't match a stored list, the user cannot edit the file.

When
the logged in user wishes to exit (using a button and macro to do so), I
save changes but I need to clear the text box at the time the user exits .
Otherwise, when the program is started again, the old username is still in
the text box and all anyone has to do is click the verification button. I
would like to know how to clear the contents of the textbox using macro
code.

thanks, I hope this is a bit clearer...

D


"Tom Ogilvy" wrote in message
...
I guess you would have to explain by what you mean by logout. Is this

done
by running some code in Excel or do you mean if the user does

Start=Logoff
from the windows start menu? Perhaps use the workbook_close event to

clear
the textbox and save the workbook.

--
Regards,
Tom Ogilvy



dirt wrote in message
. ..
I have a text box on a worksheet used to accept a username input. I

would
like to automatically clear the textbox contents when the user logs

out
but
can't seem to figure out how... Any ideas?

thanks,

Dan








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
Clear Contents gibbylinks Setting up and Configuration of Excel 5 October 12th 09 05:04 PM
Clear Contents Secret Squirrel Excel Discussion (Misc queries) 1 February 3rd 09 12:37 AM
TextBox will not clear date??????????? Tdp Excel Discussion (Misc queries) 4 January 12th 09 03:21 PM
to clear contents of a spreadsheet Jerry Excel Discussion (Misc queries) 2 August 17th 07 02:20 AM
Clear clipboard contents Cordobes Excel Discussion (Misc queries) 4 November 22nd 05 02:41 AM


All times are GMT +1. The time now is 07:39 PM.

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"