Set certain things when opening the Workbook

  • Thread starter Thread starter JoAnn
  • Start date Start date
J

JoAnn

How can I automatically have the following things happen when the user opens
a workbook:

1) Check the Add-in "AnalysisTool Pak" box so it is accessible to the user
(accessed manually via Tools > Addins).

2) Put the cursor in the 1st cell of the 1st blank row (for data entry).
 
JoAnn,

Paste this into the codemodule of the ThisWorkbook object: change the "Sheet1" to the name of the
sheet that you want selected.


Private Sub Workbook_Open()
If Not AddIns("Analysis ToolPak").Installed Then
AddIns("Analysis ToolPak").Installed = True
End If
Worksheets("Sheet1").Select
Cells(Rows.Count, 1).End(xlUp)(2).Select
End Sub


HTH,
Bernie
MS Excel MVP
 
This works great but we have since added a new 1st column for an
automatically assigned number.

How do I change the formula you provided to now go to the first row with a
blank 2nd cell?
 
Based on column B?

Cells(Rows.Count, 2).End(xlUp)(2).Select

HTH,
Bernie
MS Excel MVP
 
Back
Top