Add Chart Title
Sub AddChartTitle() Dim i As Variant i = InputBox(“Please enter your chart title”, “Chart Title”) On Error GoTo Last ActiveChart.SetElement (msoElementChartTitleAboveChart) ActiveChart.ChartTitle.Text = i Last:
Sub AddChartTitle() Dim i As Variant i = InputBox(“Please enter your chart title”, “Chart Title”) On Error GoTo Last ActiveChart.SetElement (msoElementChartTitleAboveChart) ActiveChart.ChartTitle.Text = i Last:
Sub ConvertChartToPicture() ActiveChart.ChartArea.Copy ActiveSheet.Range(“A1”).Select ActiveSheet.Pictures.Paste.Select End Sub Paste Chart as an Image VBA code: This code will help you to convert your chart into an
Sub ChangeChartType() ActiveChart.ChartType = xlColumnClustered End Sub This code will help you to convert chart type without using chart options from the tab. All you
Sub activateGetPivotData() Application.GenerateGetPivotData = True End Sub Sub deactivateGetPivotData() Application.GenerateGetPivotData = False End Sub Get Pivot Data: To disable/enable GetPivotData function you need to use
ub vba_referesh_all_pivots() Dim pt As PivotTable For Each pt In ActiveWorkbook.PivotTables pt.RefreshTable Next pt End Sub Refresh All Pivot Tables: A super quick method to
Sub UpdatePivotTableRange() Dim Data_Sheet As Worksheet Dim Pivot_Sheet As Worksheet Dim StartPoint As Range Dim DataRange As Range Dim PivotName As String Dim NewRange As
Sub HideSubtotals() Dim pt As PivotTable Dim pf As PivotField On Error Resume Next Set pt = ActiveSheet.PivotTables(ActiveCell.PivotTable.Name) If pt Is Nothing Then MsgBox “You
Sub OpenWorkbookAsAttachment() Application.Dialogs(xlDialogSendMail).Show End Sub Add Workbook to a Mail Attachment excel macro code. Once you run this macro it will open your default mail
Sub CloseAllWorkbooks() Dim wbs As Workbook For Each wbs In Workbooks wbs.Close SaveChanges:=True Next wb End Sub Use this macro code to close all open
Sub auto_open() MsgBox _ “Welcome To xlsxtemplates & Thanks for downloading this file.” End Sub Welcome Message in excel macro code. You can use auto_open
Count Open Unsaved Workbooks. Sub VisibleWorkbooks() Dim book As Workbook Dim i As Integer For Each book In Workbooks If book.Saved = False Then i
Sub Send_Mail() Dim OutApp As Object Dim OutMail As Object Set OutApp = CreateObject(“Outlook.Application”) Set OutMail = OutApp.CreateItem(0) With OutMail .to = “[email protected]” .Subject =
Welcome to Excel Templates – your ultimate destination for all things related to Excel! We pride ourselves on being a comprehensive, 100% free platform dedicated to providing top-notch, easily editable Excel templates, step-by-step tutorials, and useful macro codes. With fresh templates uploaded daily, we aim to meet every conceivable Excel need you may have. Whether you’re a student, a business professional, or someone looking to make sense of their data, our range of templates has you covered. Dive into the world of Excel Templates today and transform your number-crunching experience into an effortless journey of discovery and efficiency. Join our growing community and elevate your Excel game now.
© 2023 xlsxtemplates all rights reserved