Sunday, April 11, 2021

ek button se multiple macro assign kare

 

Sub Button1_Click()
    Call FillEmptyBlankCellWithValue 'Macro1
    Call ReplaceHyperlinks 'Macro2
    Call test 'Macro3
End Sub

specific sheet pe file open hogi excel me by code

 Private Sub Workbook_Open()

Worksheets("aa").Activate

Range("b2").Select

End Sub


hide

 

Application.ExecuteExcel4Macro "show.toobar(""ribbon"",false)"

hide

 


 Private Sub Workbook_Open()

With Application

.ScreenUpdating = False

.Calculation = xlCalculationManual

.ExecuteExcel4Macro "show.toolbar(""ribbon"",false)"

.WindowState = xlNormal

.CommandBars("full screen").Visible = False

.CommandBars("worksheet menue bar").Enabled = False

.DisplayStatusBar = False

.DisplayScrollBars = False

.DisplayFormulaBar = False

.Width = 845

.Height = 408

End With

With ActiveWindow

.DisplayWorkbookTabs = False

.DisplayRuler = False

.DisplayHeadings = False

End With

With Application

.ScreenUpdating = True

.Calculation = xlCalculationAutomatic

End With




End Sub


remove tommbar vba

 Private Sub Workbook_Activate()

    Run "RemoveToolbars"

End Sub



Private Sub Workbook_BeforeClose(Cancel As Boolean)

    On Error Resume Next

        Application.CommandBars("MyToolbar").Delete

End Sub



Private Sub Workbook_Deactivate()

    Run "RestoreToolbars"

End Sub

restore excel by vba

 Sub RestoreToolbars()

    On Error Resume Next

        With Application

           .DisplayFullScreen = False

           .CommandBars("MyToolbar").Enabled = False

           .CommandBars("Worksheet Menu Bar").Enabled = True

        End With

    On Error GoTo 0

End Sub

hide ribbon in excel by vba

 Sub RemoveToolbars()


    On Error Resume Next


        With Application


           .DisplayFullScreen = True


           .CommandBars("Full Screen").Visible = False


           .CommandBars("MyToolbar").Enabled = True


           .CommandBars("MyToolbar").Visible = True


           .CommandBars("Worksheet Menu Bar").Enabled = False


        End With


    On Error GoTo 0


End Sub


Saturday, April 10, 2021

hide all toolbar in excel by vba

 


Sub RemoveToolbars()

    On Error Resume Next

        With Application

           .DisplayFullScreen = True

           .CommandBars("Full Screen").Visible = False

           .CommandBars("MyToolbar").Enabled = True

           .CommandBars("MyToolbar").Visible = True

           .CommandBars("Worksheet Menu Bar").Enabled = False

        End With

    On Error GoTo 0

End Sub







Sub RestoreToolbars()

    On Error Resume Next

        With Application

           .DisplayFullScreen = False

           .CommandBars("MyToolbar").Enabled = False

           .CommandBars("Worksheet Menu Bar").Enabled = True

        End With

    On Error GoTo 0

End Sub

Data copy paste on two another sheet with add row in google sheet by script

 function copyDataWithinWorkbook() {   var sourceSheetName = "Dashbord"; // Replace with the name of the source sheet   var target...