![]() |
Programming Challenges!
I have a spreadsheet set up for the purpose of data entry via an external
data collection device. The spreadsheet consists of a header row: Serial No., Dim #1-Dim #16, Average, Range. I need a macro to run automatically upon opening the worksheet that will position the cursor in the first empty Dim #1 (Column B) cell. Upon entry of the 16th pc of data, I need the cursor to reset to the Dim #1 (Column B) in the next row. Also, I would like to set the spreadsheet to either autosave within the macro that resets the cursor or autosave every X minutes. Anyone? -- Thanx, Loretta |
Programming Challenges!
I, for one due to old age I guess, don't understand but if you want send
your workbook to my address below along with a snippet of this msg copied into a newly inserted sheet. -- Don Guillett Microsoft MVP Excel SalesAid Software "Loretta" wrote in message ... I have a spreadsheet set up for the purpose of data entry via an external data collection device. The spreadsheet consists of a header row: Serial No., Dim #1-Dim #16, Average, Range. I need a macro to run automatically upon opening the worksheet that will position the cursor in the first empty Dim #1 (Column B) cell. Upon entry of the 16th pc of data, I need the cursor to reset to the Dim #1 (Column B) in the next row. Also, I would like to set the spreadsheet to either autosave within the macro that resets the cursor or autosave every X minutes. Anyone? -- Thanx, Loretta |
Programming Challenges!
Hi,
Try pasting the following code into the ThisWorkbook module. On open, this code will find the first empty cell within column 2 (Column B). On any worksheet change, it will check if the cell changed was in column 17 (Column Q, Dim#16). If so, it will select the following row in column B. Hope this helps! Andy Private Sub Workbook_Open() Dim row As Long row = 1 Do Until Trim(Cells(row, 2).Value) = "" row = row + 1 Loop Cells(row, 2).Select End Sub Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Target.Column = 17 Then ActiveWorkbook.Save Cells(Target.row + 1, 2).Select End If End Sub "Loretta" wrote: I have a spreadsheet set up for the purpose of data entry via an external data collection device. The spreadsheet consists of a header row: Serial No., Dim #1-Dim #16, Average, Range. I need a macro to run automatically upon opening the worksheet that will position the cursor in the first empty Dim #1 (Column B) cell. Upon entry of the 16th pc of data, I need the cursor to reset to the Dim #1 (Column B) in the next row. Also, I would like to set the spreadsheet to either autosave within the macro that resets the cursor or autosave every X minutes. Anyone? -- Thanx, Loretta |
All times are GMT +1. The time now is 01:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com