Sheets In New Workbook - Property

     

  • This application Property
  •  

  • It denotes about number of worksheets to be created in newly created workbook
  •  

  • Once we defined new number, it stores the in application, whenever we opened new workbook, application allows workbook to open with newly assigned worksheets
  •  

    Ex: Suppose right now our excel workbook consists of 3 worksheets, now we wrote a program to open with 11(eleven) excel sheets. If we are not restored old excel sheet number at the end of the program, going forward whenever we open worksheet, application opens with newly assigned number of worksheets i,e 11(eleven)

     

     

     

    Recent Files Property

     

    Private Sub CommandButton1_Click()
    Dim i As Integer
    r = Application.RecentFiles.Count
    For i = 1 To r
    Range("A" & i).Value = Application.RecentFiles(i).Name
    Next
    End Sub

     

    Display Alerts Property

     

     

    Expression.Displayalerts

     

  • Expression: represents to application object
  •  

  • True: Indicates alerts will display
  •  

  • False: Indicates alerts won't display
  •  

     

    Screen Updating Property

     

  • Screen updating property
  • Private Sub CommandButton1_Click()
    Application.ScreenUpdating = False
    For i = 1 To 10
    Cells(i, 1) = i
    Next
    Application.ScreenUpdating = True
    End Sub