Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default re-entering userform

I made a small script where I can search and change information based o
rows.
Say I got 200 rows of information that each contains 20 columns.
That would be unberable to look at, so I made a seach function in
userform and a button that opens up another userform that loads th
information of the row that the search result gives. A little lik
DataForm with text boxes that each load a specific cell in a row.
It works fine for the first set of data I open up.
If I repeat the search for a new set of data that I want to load in th
userform, it just loads the First set of data instead.

I hope I make myself clear.. The code I been using to load the data i
the userform is this.


-----------------------
Private Sub UserForm_Initialize()

Range("A" & ActiveCell.Row).Activate

tboPhone.Value = ActiveCell.Offset(0, 0).Value
tboName.Value = ActiveCell.Offset(0, 1).Value
tboStreet.Value = ActiveCell.Offset(0, 2).Value

End Sub
-----------------------
I tried to clear the cells with a Null value og Empty value, an
nothing works... Why??

Rune Dau

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default re-entering userform

do you unload the form rather than hide it. The initialize event only runs
when you first create the form. If you hide and then show the form, it is
not created and the initialize event is not run.

--
Regards,
Tom Ogilvy

"Rune_Daub " wrote in message
...
I made a small script where I can search and change information based on
rows.
Say I got 200 rows of information that each contains 20 columns.
That would be unberable to look at, so I made a seach function in a
userform and a button that opens up another userform that loads the
information of the row that the search result gives. A little like
DataForm with text boxes that each load a specific cell in a row.
It works fine for the first set of data I open up.
If I repeat the search for a new set of data that I want to load in the
userform, it just loads the First set of data instead.

I hope I make myself clear.. The code I been using to load the data in
the userform is this.


-----------------------
Private Sub UserForm_Initialize()

Range("A" & ActiveCell.Row).Activate

tboPhone.Value = ActiveCell.Offset(0, 0).Value
tboName.Value = ActiveCell.Offset(0, 1).Value
tboStreet.Value = ActiveCell.Offset(0, 2).Value

End Sub
-----------------------
I tried to clear the cells with a Null value og Empty value, and
nothing works... Why??

Rune Daub


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default re-entering userform

Thx... that would probably solve my problem.. I have just been hiding
it... I will try with the unload function :)


---
Message posted from http://www.ExcelForum.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
Entering HH:MM Carole O Excel Discussion (Misc queries) 9 October 5th 09 09:56 PM
Entering 24 Hour Clock without entering : JB Bates[_2_] Excel Discussion (Misc queries) 5 October 5th 09 09:53 PM
Entering Almost Nothing Gary''s Student Excel Discussion (Misc queries) 4 August 21st 09 06:31 PM
entering dates Ed Excel Discussion (Misc queries) 1 November 26th 06 05:42 PM
102. not entering the same as 102.00 Stacy Excel Discussion (Misc queries) 8 December 2nd 05 06:02 PM


All times are GMT +1. The time now is 02:16 PM.

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"