Skip to main content

Posts

Showing posts from December, 2019

VBA Coding : For Sharing data by Email With Attachment using Excel data in other Place

' We have some data in Excel that we want to share by email with attachment हमारे पास Excel में कुछ डेटा हैं जिन्हें हम अनुलग्नक के साथ ईमेल द्वारा साझा करना चाहते हैं Sub For_GSTR3B_Report_Share() Dim sWorkbook1 As Workbook Dim wb As Workbook Dim objApp As Object  'For New Workbook Dim ws As Worksheet Dim savepath As String         'Delete all file from folder temp2         On Error Resume Next         Kill "C:\Users\PRAMOD.GARG\Desktop\pk_temp*.*"         On Error GoTo 0               On Error Resume Next         Set wb = Workbooks("Pkgarg_Control_Sheet_With_Gaurav_Coding.xlsm")         On Error GoTo 0         If Not wb Is Nothing Then         MsgBox "It's open"         wb.Activate         Worksheets("For_GSTR3B_Report_Share...

VBA Coding - For Making Consolidated Data sheet by using MultipleSheets data (MultipleSheets डेटा का उपयोग करके समेकित डाटा बनाने के लिए)

VBA Coding - For Making Consolidated Data sheet by using MultipleSheets data  (MultipleSheets डेटा का उपयोग करके समेकित डाटा बनाने के लिए) Sub For_Mastersheet_Update() Dim wb As Workbook Dim rng As Range Set wb = Workbooks("Pk_File.xlsm") wb.Activate Worksheets("Master").Activate Worksheets("Master").Cells.ClearContents Worksheets("XYZ2").Activate Worksheets("XYZ2").Range("a1").CurrentRegion.Select   ' For Select Current Region or All Data Worksheets("XYZ2").Range("a1").CurrentRegion.Copy     ' For Copy Select Data Worksheets("Master").Activate                         ' For activate sheet where you want to copy data Worksheets("Master").Range("a1").PasteSpecial Paste:=xlPasteValuesAndNumberFormats   ' Paste Copy Data Selection.Columns.AutoFit          ...

For Workbook & Worksheet Activate & Select all data & Copy Select Data & paste Where you want वर्कबुक और वर्कशीट सक्रिय के लिए और सभी डेटा का चयन करें & कॉपी करें डाटा और जहाँ आप चाहते हैं उसे चिपकाएँ

For Workbook & Worksheet Activate  & Select all data  & Copy Select Data  & paste Where you want   वर्कबुक और वर्कशीट सक्रिय के लिए और सभी डेटा का चयन करें  & कॉपी करें डाटा और जहाँ आप चाहते हैं उसे चिपकाएँ Sub Mastersheet_Update() Dim wb As Workbook Set wb = Workbooks("WorkbookName.xlsm") wb.Activate Worksheets("WorkSheetName").Activate Worksheets("WorkShetName").Range("a1").CurrentRegion.Select Worksheets("WorkShetName").Range("a1").CurrentRegion.Copy Worksheets("WorkShetName").Activate Worksheets("WorkShetName").Range("a1").PasteSpecial Paste:=xlPasteValuesAndNumberFormats or With Worksheets(" WorkShetName ").Range("A1") .PasteSpecial xlPasteValues .PasteSpecial xlPasteFormats Selection.Columns.AutoFit End With End Sub

For Workbook & Worksheet Activate & Select all data & Copy Select Data वर्कबुक और वर्कशीट सक्रिय के लिए और सभी डेटा का चयन करें & कॉपी करें डाटा

For Workbook & Worksheet Activate & Select all data & Copy Select Data वर्कबुक और वर्कशीट सक्रिय के लिए और सभी डेटा का चयन करें  & कॉपी करें डाटा Sub Mastersheet_Update() Dim wb As Workbook Set wb = Workbooks("WorkbookName.xlsm") wb.Activate Worksheets("WorkSheetName").Activate Worksheets("WorkShetName").Range("a1").CurrentRegion.Select Worksheets("WorkShetName").Range("a1").CurrentRegion.Copy End Sub

For Workbook & Worksheet Activate & Select all data वर्कबुक और वर्कशीट सक्रिय के लिए और सभी डेटा का चयन करें

For Workbook & Worksheet Activate & Select all data वर्कबुक और वर्कशीट सक्रिय के लिए और सभी डेटा का चयन करें Sub Mastersheet_Update() Dim wb As Workbook Set wb = Workbooks("WorkbookName.xlsm") wb.Activate Worksheets("WorkSheetName").Activate Worksheets("WorkShetName").Range("a1").CurrentRegion.Select End Sub

VBA Code to Clear Cells with Zero शून्य के साथ सेल को साफ़ करने के लिए VBA कोड

# VBA Code to Clear Cells with Zero:- To  clear cells with zero within a cell range using VBA , use a macro with the following statement structure: शून्य के साथ सेल को साफ़ करने के लिए VBA कोड For   Each   Cell  In   Range If   Cell.Value = myValue  Then   Cell.Clear Next   Cell VBA Statement Explanation Lines #1 and #3: For Each Cell In Range | Next Cell Item:  For Each… In… Next. VBA Construct:  For Each… Next statement. Description:  The For Each… Next statement repeats the statement within the loop (line #2) for each element (Cell) in the cell range (Range) you want to search for zeroes in. Item:  Cell. VBA Construct:  Element of the For Each… Next statement and object variable of the Range object data type. Description:  The Element of the For Each… Next statement is an object variable used to iterate through the elements (Cell) of the cell range (Range) you want to sear...

VBA Code to Clear Cell Color VBA कोड सेल रंग साफ़ करने के लिए

# VBA Code to Clear Cell Color:- To  clear cell color using VBA , use a statement with the following structure:- VBA कोड सेल रंग साफ़ करने के लिए Cells.Interior.Color = xlColorIndexNone VBA Statement Explanation Item:  Cells. VBA Construct:  Range object. Description:  Range object representing the cells where you want to clear cell formatting. You can usually return a Range object with constructs such as the Worksheet.Range, Worksheet.Cells (with Range.Item), Range.Offset, Range.Resize or Application.ActiveCell properties. If you explicitly declare an object variable to represent Cells, use the Range object data type. Item:  Interior. VBA Construct:  Range.Interior property and Interior object. Description:  The Range. Interior property returns an Interior object representing the interior of the cell range you specify (Cells). Item:  Color. VBA Construct:  Interior.Color property. Description:  The Inte...

VBA Code to Clear Cell Formatting VBA कोड सेल स्वरूपण साफ़ करने के लिए

# VBA Code to Clear Cell Formatting:- To  clear cell formatting using VBA , use a statement with the following structure:- VBA का उपयोग करके सेल फ़ॉर्मेटिंग को साफ़ करने के लिए Cells.ClearFormats VBA Statement Explanation Item:  Cells. VBA Construct:  Range object. Description:  Range object representing the cells where you want to clear cell formatting. You can usually return a Range object with constructs such as the Worksheet.Range, Worksheet.Cells (with Range.Item), Range.Offset, Range.Resize or Application.ActiveCell properties. If you explicitly declare an object variable to represent Cells, use the Range object data type. Item:  ClearFormats. VBA Construct:  Range.ClearFormats method. Description:  The Range.ClearFormats method clears the formatting of the Range object you specify (Cells). Range.ClearFormats doesn't clear values or formulas. VBA स्टेटमेंट स्पष्टीकरण 1. आइटम: सेल। VBA निर्माण: ...