I can't get this to work??
I want ActiveWindow.ScrollRow to scroll down to the row = the RowNum
Can someone crack this for me please.
' Go to data sheet and select Todays date and Highlight Row
![]()
Please Login or Register to view this content.
I can't get this to work??
I want ActiveWindow.ScrollRow to scroll down to the row = the RowNum
Can someone crack this for me please.
' Go to data sheet and select Todays date and Highlight Row
![]()
Please Login or Register to view this content.
Last edited by nordicdust; 07-29-2018 at 04:20 PM. Reason: I forgot code wrap
Without any Excel sample or at least more details about the issue it is not easy to help ...!
- Battle without fear gives no glory - Just try
Here is the file, thank you for taking a look
We seem to be missing a function as called inHowever, the sheet in the sample workbook is called DATABASE, not DATA, so that would error out.![]()
Please Login or Register to view this content.
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
It seems that "Todays Date Row number" is not accurate because is missing a 8 rows offset due to the header row in sheet "DATABASE"
As a beginner starter :
PHP Code:
Sub Demo1()
With Ark5
.Activate
.UsedRange.Rows(Ark80.[D9].Value2).Select
End With
End Sub
Do you like it ? So thanks to click on bottom left star icon « ★ Add Reputation » !
You would have better to search for the active date in sheet DATABASE and work with the row found
![]()
Please Login or Register to view this content.
Ben Van Johnson
See perhaps your code updated
![]()
Please Login or Register to view this content.
Last edited by PCI; 07-29-2018 at 05:37 PM. Reason: Protection code made active: Comments removed
Another way from the date as a beginner starter :
PHP Code:
Sub Demo2()
Dim V
With Ark5.ListObjects(1)
V = Application.Match(Fix(Ark80.[D4].Value2), .DataBodyRange.Columns(2), 0)
If IsNumeric(V) Then
.Parent.Activate
.ListRows(V).Range.Select
End If
End With
End Sub
Do you like it ? So thanks to click on bottom left star icon « ★ Add Reputation » !
Thanks Marc
Both your solutions worked great.
I am not quite sure I understand your code, would you comment it for me. I am new in VBA :-)
I like Demo1 as it is simpel and stil as fast as Demo2, 0,78 sec. my test showed.
But I like how Demo2 gets the right cell from the date and not from ENGINE SHEET D9
This is how I did it before and it is nearly same time to run as yours. Demo3
Thanks again for your help
![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Thanks for your effort to help, I did not get your solution to work.
But thanks for your help :-)
Thanks for your help Ben, Marc L found a solution I was happy with :-)
Thanks for the rep' !
I won't comment as it is at beginner level, all is yet within VBA inner help
except for Application.Match which is the Excel worksheet function MATCH (to see in Excel help) …
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks