Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default UserForm: Jump to the next visible cell

Hi, I'm using German Excel'97.

I have Userform, which helps visualising and editing an excel table of more
thousand records and more than 70 data elements in each record. Functions
like ScrollBar, SpinButton and other good stuff is provided.
It works fine, but I have to provide various selections of the excel table,
for instance colums AR is "Department" and I have macros providing
convenient selection of one or the other departments' records. The problem
is when the user clicks the macro button of her/his deparment, the macro
selects the respective department's records, however the userform opens the
first record on the table which is in most cases hidden, due to the
selection.

I cannot make a code which would open the UserForm filled with the first
visible record on the selected excel table .
I also have problems putting a code together for the SpinButton which would
jump on to the next visible record, jumping over hidden ones.

I would appreciate your help.

Gabor


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default UserForm: Jump to the next visible cell

See this for help:

http://tinyurl.com/2ewcl

--
Regards,
Tom Ogilvy



"Gabor G" wrote in message
...
Hi, I'm using German Excel'97.

I have Userform, which helps visualising and editing an excel table of

more
thousand records and more than 70 data elements in each record. Functions
like ScrollBar, SpinButton and other good stuff is provided.
It works fine, but I have to provide various selections of the excel

table,
for instance colums AR is "Department" and I have macros providing
convenient selection of one or the other departments' records. The problem
is when the user clicks the macro button of her/his deparment, the macro
selects the respective department's records, however the userform opens

the
first record on the table which is in most cases hidden, due to the
selection.

I cannot make a code which would open the UserForm filled with the first
visible record on the selected excel table .
I also have problems putting a code together for the SpinButton which

would
jump on to the next visible record, jumping over hidden ones.

I would appreciate your help.

Gabor




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default UserForm: Jump to the next visible cell

Tom, thanks a lot, the following macro does it all:

Sub JumpToFirstVisible ()
Set arng1 = ActiveSheet.AutoFilter.Range
Set arng1 = arng1.Offset(1, 0).Resize(arng1.Rows.Count - 1, 1)
Set arng1 = arng1.SpecialCells(xlVisible)
'Set aRng1 = aRng1.SpecialCells(xlCellTypeVisible)
For Each cell In arng1
Debug.Print Cells.Address
Next
arng1(1, 1).Select
End Sub

I don't know the difference between (xlVisible) and (xlCellTypeVisible) but
both lines work OK.

Gabor

"Tom Ogilvy" schrieb im Newsbeitrag
...
See this for help:

http://tinyurl.com/2ewcl

--
Regards,
Tom Ogilvy



"Gabor G" wrote in message
...
Hi, I'm using German Excel'97.

I have Userform, which helps visualising and editing an excel table of

more
thousand records and more than 70 data elements in each record.

Functions
like ScrollBar, SpinButton and other good stuff is provided.
It works fine, but I have to provide various selections of the excel

table,
for instance colums AR is "Department" and I have macros providing
convenient selection of one or the other departments' records. The

problem
is when the user clicks the macro button of her/his deparment, the macro
selects the respective department's records, however the userform opens

the
first record on the table which is in most cases hidden, due to the
selection.

I cannot make a code which would open the UserForm filled with the

first
visible record on the selected excel table .
I also have problems putting a code together for the SpinButton which

would
jump on to the next visible record, jumping over hidden ones.

I would appreciate your help.

Gabor






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
Jump to cell ickleyates Excel Discussion (Misc queries) 2 October 18th 08 04:58 AM
Jump to cell based on cell results created by calendar control too JB Excel Discussion (Misc queries) 3 January 15th 08 08:18 PM
HOW TO JUMP TO THE LAST CELL IN A ROW? Mark Excel Discussion (Misc queries) 3 October 10th 05 03:40 PM
How do I double click a cell and jump to cell's referenced cell JerryJuice Excel Discussion (Misc queries) 2 September 10th 05 10:24 PM
Keep userform visible, but return control to calling routine Ryan Poth[_2_] Excel Programming 0 August 21st 03 05:28 AM


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