View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
John Calder John Calder is offline
external usenet poster
 
Posts: 176
Default Set Textbox on a Form to Deafault

Thanks for your quick response.

I pasted your code onto the cose for the form but it does not seem to work?
Maybe I am pasting it into the wrong place?

Can you help?

The other method of putting the value somewhere else in the spreadsheet is
not really what I am looking for.

On the form I have a "enter button" that copies all the entries into a
worksheet and clears the form. I would like that when the Week is entered by
the user it stays in the box after each time I press the enter button until
such times the user decides to enter a new week number.

Home this helps

Thanks

John

"OssieMac" wrote:

Hi John,

There are a couple of ways of doing this. One is to set the TextBox property
Linkedcell to a cell somewhere in the workbook and enter the value in that
cell.

Another way is to use the got focus event to set the value when the user
clicks in the textbox.

Private Sub TextWeek_GotFocus()
Me.TextWeek = 20
End Sub

--
Regards,

OssieMac