Skip to main content

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

  1. 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.
  2. 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).
  3. Item: Color.

    • VBA Construct: Interior.Color property.
    • Description: The Interior.Color property allows you to set the primary color of the cell interior represented by the Interior object returned by Range.Interior.
  4. Item: =.

    • VBA Construct: Assignment operator.
    • Description: The assignment operator assigns the xlColorIndexNone value to the Interior.Color property.
  5. Item: xlColorIndexNone.
    • VBA Construct: xlColorIndexNone constant.
    • Description: The xlColorIndexNone constant specifies that the color of the Interior object representing the interior of Cells is none.


VBA स्टेटमेंट स्पष्टीकरण

1. आइटम: सेल।

VBA निर्माण: रेंज ऑब्जेक्ट।

विवरण: रेंज ऑब्जेक्ट उन कोशिकाओं का प्रतिनिधित्व करता है जहाँ आप सेल फ़ॉर्मेटिंग को साफ़ करना चाहते हैं।

आप आमतौर पर Worksheet.Range, Worksheet.Cells (Range.Item के साथ), Range.Offset, Range.Resize या Application.ActiveCell प्रॉपर्टी जैसे कंस्ट्रक्शन के साथ रेंज ऑब्जेक्ट वापस कर सकते हैं। यदि आप कक्ष का प्रतिनिधित्व करने के लिए स्पष्ट रूप से ऑब्जेक्ट चर घोषित करते हैं, तो रेंज ऑब्जेक्ट डेटा प्रकार का उपयोग करें।

2. आइटम: आंतरिक।

VBA कंस्ट्रक्ट: रेंज.इंटीरियर प्रॉपर्टी और इंटीरियर ऑब्जेक्ट।

विवरण: रेंज। आंतरिक गुण आपके द्वारा निर्दिष्ट सेल श्रेणी के इंटीरियर का प्रतिनिधित्व करने वाली आंतरिक वस्तु देता है।

3. आइटम: रंग।

VBA का निर्माण: आंतरिक। रंग की संपत्ति।

विवरण: आंतरिक। रंग की संपत्ति आपको आंतरिक आंतरिक श्रेणी द्वारा दर्शाए गए सेल इंटीरियर के प्राथमिक रंग को सेट करने की अनुमति देती है।

4. मद: =।

VBA निर्माण: असाइनमेंट ऑपरेटर।

विवरण: असाइनमेंट ऑपरेटर आंतरिक के लिए xlColorIndexNone मान असाइन करता है। रंग संपत्ति।

5. आइटम: xlColorIndexNone।

VBA निर्माण: xlColorIndexNone स्थिर।

विवरण: xlColorIndexNone स्थिरांक निर्दिष्ट करता है कि कोशिकाओं के इंटीरियर का प्रतिनिधित्व करने वाली आंतरिक वस्तु का रंग कोई भी नहीं है।

Comments

Popular posts from this blog

What is Excel ? एक्सेल क्या है ?

Excel is a spreadsheet application which have rows and columns to organize data. We can easily organize and analysis data in excel. एक्सेल एक स्प्रेडशीट एप्लिकेशन है जिसमें डेटा व्यवस्थित करने के लिए पंक्तियां और कॉलम हैं। हम एक्सेल में आसानी से डेटा व्यवस्थित और विश्लेषण कर सकते हैं।

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 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...