Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Step to next row in a filtered sheet using form
Hi
Hope for some help to the following issue: I have a form that I use to enter/edit information in a excel sheet. This works ok. But somtime I use filters in the sheet, but when the form is still stepping through the filtered (not shown rows). I want it to step only through the filtered list/rows. The code for stepping forward in the form are shown below - any help will be much appriciatied. Private Sub cmdNext_Click() On Error Resume Next ' ignore error for the moment ActiveCell.Offset(1, 0).Activate If Err < 0 Then Err.Clear ' trash the error End If On Error GoTo 0 ' resume normal error trapping If ActiveCell.Value < "" And ActiveCell.Row 4 Then Call Initialize_Form End If End Sub /Steen |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Step to next row in a filtered sheet using form
Sub filteredRange()
Const startingRow = 2 Dim rng As Range Dim i As Long Set rng = Range(Cells(startingRow, "A"), Cells(Rows.Count, "A")) For Each c In rng If Not c.EntireRow.Hidden Then MsgBox c.Value End If Next c End Sub "Steen" wrote: Hi Hope for some help to the following issue: I have a form that I use to enter/edit information in a excel sheet. This works ok. But somtime I use filters in the sheet, but when the form is still stepping through the filtered (not shown rows). I want it to step only through the filtered list/rows. The code for stepping forward in the form are shown below - any help will be much appriciatied. Private Sub cmdNext_Click() On Error Resume Next ' ignore error for the moment ActiveCell.Offset(1, 0).Activate If Err < 0 Then Err.Clear ' trash the error End If On Error GoTo 0 ' resume normal error trapping If ActiveCell.Value < "" And ActiveCell.Row 4 Then Call Initialize_Form End If End Sub /Steen |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Step to next row in a filtered sheet using form
Hi Mike
Thanks for your quick answer. I sorry, but I don't get the point in your answer. Would it be possible for you to add a few comments on your answer - I have a little trouble in seeing how to use the FilterdRange() macro in my part of the code? /Steen "Mike" wrote: Sub filteredRange() Const startingRow = 2 Dim rng As Range Dim i As Long Set rng = Range(Cells(startingRow, "A"), Cells(Rows.Count, "A")) For Each c In rng If Not c.EntireRow.Hidden Then MsgBox c.Value End If Next c End Sub "Steen" wrote: Hi Hope for some help to the following issue: I have a form that I use to enter/edit information in a excel sheet. This works ok. But somtime I use filters in the sheet, but when the form is still stepping through the filtered (not shown rows). I want it to step only through the filtered list/rows. The code for stepping forward in the form are shown below - any help will be much appriciatied. Private Sub cmdNext_Click() On Error Resume Next ' ignore error for the moment ActiveCell.Offset(1, 0).Activate If Err < 0 Then Err.Clear ' trash the error End If On Error GoTo 0 ' resume normal error trapping If ActiveCell.Value < "" And ActiveCell.Row 4 Then Call Initialize_Form End If End Sub /Steen |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Step to next row in a filtered sheet using form
Im not sure what your exactly what your looking for but maybe this
Private Sub cmdNext_Click() On Error Resume Next ' ignore error for the moment If ActiveCell.EntireRow.Hidden Then Do While ActiveCell.EntireRow.Hidden ActiveCell.Offset(1, 0).Activate Loop Else ActiveCell.Offset(1, 0).Activate End If If Err < 0 Then Err.Clear ' trash the error End If On Error GoTo 0 ' resume normal error trapping If ActiveCell.Value < "" And ActiveCell.Row 4 Then Call Initialize_Form End If End Sub "Steen" wrote: Hi Mike Thanks for your quick answer. I sorry, but I don't get the point in your answer. Would it be possible for you to add a few comments on your answer - I have a little trouble in seeing how to use the FilterdRange() macro in my part of the code? /Steen "Mike" wrote: Sub filteredRange() Const startingRow = 2 Dim rng As Range Dim i As Long Set rng = Range(Cells(startingRow, "A"), Cells(Rows.Count, "A")) For Each c In rng If Not c.EntireRow.Hidden Then MsgBox c.Value End If Next c End Sub "Steen" wrote: Hi Hope for some help to the following issue: I have a form that I use to enter/edit information in a excel sheet. This works ok. But somtime I use filters in the sheet, but when the form is still stepping through the filtered (not shown rows). I want it to step only through the filtered list/rows. The code for stepping forward in the form are shown below - any help will be much appriciatied. Private Sub cmdNext_Click() On Error Resume Next ' ignore error for the moment ActiveCell.Offset(1, 0).Activate If Err < 0 Then Err.Clear ' trash the error End If On Error GoTo 0 ' resume normal error trapping If ActiveCell.Value < "" And ActiveCell.Row 4 Then Call Initialize_Form End If End Sub /Steen |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Step to next row in a filtered sheet using form
Spot on - thanks a lot Mike. :-)
"Mike" wrote: Im not sure what your exactly what your looking for but maybe this Private Sub cmdNext_Click() On Error Resume Next ' ignore error for the moment If ActiveCell.EntireRow.Hidden Then Do While ActiveCell.EntireRow.Hidden ActiveCell.Offset(1, 0).Activate Loop Else ActiveCell.Offset(1, 0).Activate End If If Err < 0 Then Err.Clear ' trash the error End If On Error GoTo 0 ' resume normal error trapping If ActiveCell.Value < "" And ActiveCell.Row 4 Then Call Initialize_Form End If End Sub "Steen" wrote: Hi Mike Thanks for your quick answer. I sorry, but I don't get the point in your answer. Would it be possible for you to add a few comments on your answer - I have a little trouble in seeing how to use the FilterdRange() macro in my part of the code? /Steen "Mike" wrote: Sub filteredRange() Const startingRow = 2 Dim rng As Range Dim i As Long Set rng = Range(Cells(startingRow, "A"), Cells(Rows.Count, "A")) For Each c In rng If Not c.EntireRow.Hidden Then MsgBox c.Value End If Next c End Sub "Steen" wrote: Hi Hope for some help to the following issue: I have a form that I use to enter/edit information in a excel sheet. This works ok. But somtime I use filters in the sheet, but when the form is still stepping through the filtered (not shown rows). I want it to step only through the filtered list/rows. The code for stepping forward in the form are shown below - any help will be much appriciatied. Private Sub cmdNext_Click() On Error Resume Next ' ignore error for the moment ActiveCell.Offset(1, 0).Activate If Err < 0 Then Err.Clear ' trash the error End If On Error GoTo 0 ' resume normal error trapping If ActiveCell.Value < "" And ActiveCell.Row 4 Then Call Initialize_Form End If End Sub /Steen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a Drop Down List with Step by Step Instructions for 2007 | Excel Worksheet Functions | |||
Need step by step to add invoice numbering to excel template | New Users to Excel | |||
Creating a form in excel to step through scenarios | Excel Discussion (Misc queries) | |||
What is the step-by-step procedure for making a data list? | Excel Discussion (Misc queries) | |||
I need step by step instructions to create a macro for 10 imbedde. | Excel Worksheet Functions |