View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Control record displayed in DataForm window

You could use send keys:

SendKeys "{DOWN " & ActiveCell.Row - 2 & "}"
Application.DisplayAlerts = False
ActiveSheet.ShowDataForm
Application.DisplayAlerts = True


This will start the dataform on the row with the activecell.

Replace activecell.row with the number of the row you want to start on.

buczacz wrote:

The Excel data/form window facilitates entering data when the fields in
a record extend over more than the width of the display screen.

The VBA command, "dataform," opens the data form window, but it always
displays the top record on the sheet. Once it is open, you can then
manually scroll down to any record on the sheet. Is there any way to
control which record it displays on opening in Excel95 or Excel97 other
than reordering the sheet so that the record of interest is at the top
of the sheet?

Michael in Los Angeles


--

Dave Peterson