VBA Code to Clear Cell Contents and Keep Formatting VBA कोड स्पष्ट सेल सामग्री और स्वरूपण साफ़ करने के लिए
# VBA Code to Clear Cell Contents and Keep Formatting:-
To clear cell contents (but not formatting) using VBA, use a statement with the following structure:
VBA का उपयोग करके सेल सामग्री (लेकिन प्रारूपण नहीं) को साफ़ करने के लिए
VBA का उपयोग करके सेल सामग्री (लेकिन प्रारूपण नहीं) को साफ़ करने के लिए
Cells.ClearContents
VBA Statement Explanation
- Item: Cells.
- VBA Construct: Range object.
- Description: Range object representing the cells where you want to clear the contents but not the 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: ClearContents.
- VBA Construct: Range.ClearContents method.
- Description: The Range.ClearContents method clears values and formulas from the Range object you specify (Cells). Range.ClearContents leaves formatting intact.
VBA स्टेटमेंट स्पष्टीकरण
1. आइटम: सेल।
VBA निर्माण: रेंज ऑब्जेक्ट।
विवरण: रेंज ऑब्जेक्ट उन कोशिकाओं का प्रतिनिधित्व करता है जहाँ आप सामग्री को साफ़ करना चाहते हैं लेकिन प्रारूपण को नहीं।
आप आमतौर पर Worksheet.Range, Worksheet.Cells (Range.Item के साथ), Range.Offset, Range.Resize या Application.ActiveCell प्रॉपर्टी जैसे कंस्ट्रक्शन के साथ रेंज ऑब्जेक्ट वापस कर सकते हैं। यदि आप कक्ष का प्रतिनिधित्व करने के लिए स्पष्ट रूप से ऑब्जेक्ट चर घोषित करते हैं, तो रेंज ऑब्जेक्ट डेटा प्रकार का उपयोग करें।
2. आइटम: ClearContents।
VBA निर्माण: Range.ClearContents विधि।
विवरण: Range.ClearContents पद्धति आपके द्वारा निर्दिष्ट (कक्ष) श्रेणी ऑब्जेक्ट से मान और सूत्र साफ़ करती है। Range.ClearContents बरकरार स्वरूपण छोड़ देता है।
Comments
Post a Comment
Your advice or suggestions will be much appreciated and welcomed....