More on using VB in Excel
Thanks for the hint, but how do I have the macro automatically execute when I open the spreadsheet file?
Quote:
Originally posted by Nitro
Right click on an empty error next to the toolbar. Select the FORM toolbar. Drop either a listbox or combobox on the form and right click to select FORMAT CONTROL. Go to the CONTROL tab and select the INPUT RANGE icon. Click on COLUMN A and hit ENTER. Close the dialog box. Run the following codes!
Code:
Sub Macro1()
Cells.Clear
Dim int_X As Integer
For int_X = 1 To Worksheets.Count
Sheets("Sheet1").Select
Cells(int_X, 1).Value = Sheets(int_X).Name
Next
End Sub