मुख्य सामग्री पर जाएं

Excel में वर्कशीट पर कमांड बटन को हमेशा कैसे फ़्लोट करें?

लेखक: सिलुविया अंतिम संशोधित: 2020-06-19

कुछ मामलों में, आपको अपनी वर्कशीट के साथ चलते रहने के लिए एक फ्लोटिंग कमांड बटन (एक्टिवएक्स कंट्रोल) की आवश्यकता हो सकती है, चाहे आप वर्कशीट को ऊपर या नीचे कैसे भी स्क्रॉल करें। यह आलेख आपको इसे प्राप्त करने की विधि दिखाएगा.

वर्कशीट पर हमेशा वीबीए कोड के साथ एक कमांड बटन फ्लोट करना


वर्कशीट पर हमेशा वीबीए कोड के साथ एक कमांड बटन फ्लोट करना

वर्कशीट में कमांड बटन को हमेशा तैरता रखने के लिए कृपया निम्नानुसार कार्य करें।

1. जिस वर्कशीट में ActiveX कंट्रोल्स कमांड बटन है, आप उसे फ्लोटिंग बनाना चाहते हैं, शीट टैब पर राइट क्लिक करें और फिर क्लिक करें कोड देखें संदर्भ मेनू से

2. पॉप अप में अनुप्रयोगों के लिए माइक्रोसॉफ्ट विज़ुअल बेसिक विंडो, नीचे दिए गए VBA कोड को कॉपी करें और कोड विंडो में पेस्ट करें।

वीबीए कोड: एक कमांड बटन को वर्कशीट में हमेशा तैरता हुआ बनाएं

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
        On Error GoTo 0
        With Cells(Windows(1).ScrollRow, Windows(1).ScrollColumn)
            CommandButton1.Top = .Top + 100
            CommandButton1.Left = .Left + 300
        End With
End Sub

नोट: उपरोक्त कोड में, CommandButton1 वह बटन नाम है जिसे आप हमेशा दृश्यमान रखना चाहते हैं। कृपया इसे अपनी आवश्यकता के अनुसार बदलें।

3. फिर दबाएं ऑल्ट + Q बाहर निकलने के लिए कुंजियाँ अनुप्रयोगों के लिए माइक्रोसॉफ्ट विज़ुअल बेसिक खिड़की.

अब से, कमांड बटन हमेशा वर्कशीट के शीर्ष केंद्र पर सक्रिय क्लिक किए गए सेल की गति के साथ नीचे स्क्रीनशॉट में दिखाए अनुसार तैरता रहेगा।

नोट: यह VBA केवल ActiveX नियंत्रित कमांड बटन के लिए काम करता है।


संबंधित लेख:

सर्वोत्तम कार्यालय उत्पादकता उपकरण

🤖 कुटूल्स एआई सहयोगी: निम्न के आधार पर डेटा विश्लेषण में क्रांति लाएं: बुद्धिमान निष्पादन   |  कोड जनरेट करें  |  कस्टम फ़ॉर्मूले बनाएं  |  डेटा का विश्लेषण करें और चार्ट बनाएं  |  कुटूल फ़ंक्शंस का आह्वान करें...
लोकप्रिय सुविधाएँ: डुप्लिकेट ढूंढें, हाइलाइट करें या पहचानें   |  रिक्त पंक्तियाँ हटाएँ   |  डेटा खोए बिना कॉलम या सेल को संयोजित करें   |   फॉर्मूला के बिना गोल ...
सुपर लुकअप: एकाधिक मानदंड VLookup    मल्टीपल वैल्यू वीलुकअप  |   अनेक शीटों में VLookup   |   फजी लुकअप ....
उन्नत ड्रॉप-डाउन सूची: शीघ्रता से ड्रॉप डाउन सूची बनाएं   |  आश्रित ड्रॉप डाउन सूची   |  बहु-चयन ड्रॉप डाउन सूची ....
स्तम्भ प्रबंधक: कॉलमों की एक विशिष्ट संख्या जोड़ें  |  कॉलम ले जाएँ  |  छिपे हुए कॉलम की दृश्यता स्थिति टॉगल करें  |  रेंज और कॉलम की तुलना करें ...
फीचर्ड फीचर्स: ग्रिड फोकस   |  डिजाइन देखें   |   बड़ा फॉर्मूला बार    कार्यपुस्तिका एवं शीट प्रबंधक   |  संसाधन लाइब्रेरी (ऑटो टेक्स्ट)   |  खजूर बीनने वाला   |  कार्यपत्रकों को संयोजित करें   |  एन्क्रिप्ट/डिक्रिप्ट सेल    सूची के अनुसार ईमेल भेजें   |  सुपर फ़िल्टर   |   विशेष फ़िल्टर (फ़िल्टर बोल्ड/इटैलिक/स्ट्राइकथ्रू...) ...
शीर्ष 15 टूलसेट12 टेक्स्ट टूल्स (पाठ जोड़ें, अक्षर हटाएँ, ...)   |   50 + चार्ट प्रकार (गैन्ट चार्ट, ...)   |   40+ प्रैक्टिकल सूत्र (जन्मदिन के आधार पर आयु की गणना करें, ...)   |   19 निवेशन टूल्स (QR कोड डालें, पथ से चित्र सम्मिलित करें, ...)   |   12 रूपांतरण टूल्स (शब्दों को संख्याएँ, मुद्रा रूपांतरण, ...)   |   7 विलय और विभाजन टूल्स (उन्नत संयोजन पंक्तियाँ, विभाजन कोशिकाओं, ...)   |   ... और अधिक

एक्सेल के लिए कुटूल के साथ अपने एक्सेल कौशल को सुपरचार्ज करें, और पहले जैसी दक्षता का अनुभव करें। एक्सेल के लिए कुटूल उत्पादकता बढ़ाने और समय बचाने के लिए 300 से अधिक उन्नत सुविधाएँ प्रदान करता है।  वह सुविधा प्राप्त करने के लिए यहां क्लिक करें जिसकी आपको सबसे अधिक आवश्यकता है...

Description


ऑफिस टैब ऑफिस में टैब्ड इंटरफ़ेस लाता है, और आपके काम को बहुत आसान बनाता है

  • Word, Excel, PowerPoint में टैब्ड संपादन और रीडिंग सक्षम करें, प्रकाशक, एक्सेस, विसियो और प्रोजेक्ट।
  • नई विंडो के बजाय एक ही विंडो के नए टैब में एकाधिक दस्तावेज़ खोलें और बनाएं।
  • आपकी उत्पादकता 50% बढ़ जाती है, और आपके लिए हर दिन सैकड़ों माउस क्लिक कम हो जाते हैं!
Comments (15)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
it works fine in one workbook, now i tried to do the same thing in another workbook and i got a compiling error because of the selectionchange. i'm pretty new in vba - maybe it's because i already got a private sub worksheet_selectionchange? do you know how i can fix this? 
This comment was minimized by the moderator on the site
I think it should specify that the button has to be an ActiveX one to the code work. ^.^'
This comment was minimized by the moderator on the site
Hi,
Thank you for your reminder.
This comment was minimized by the moderator on the site
I think it should specify that the button has to be an ActiveX one to the code work. ^.^'
This comment was minimized by the moderator on the site
Does not work :-(
This comment was minimized by the moderator on the site
Hi,
When you scrolling down the worksheet, please click to change the active cell to the visible area to make it work. Thank you for your comment.
This comment was minimized by the moderator on the site
see it, not working, i'm scrolling down and also command button down, i want to fix on the top of right side of sheet.
This comment was minimized by the moderator on the site
Hi,
When you scrolling down the worksheet, please click to change the active cell to the visible area to make it work. Thank you for your comment.
This comment was minimized by the moderator on the site
not working
This comment was minimized by the moderator on the site
Thanks a lot ... It worked...
This comment was minimized by the moderator on the site
Works fine for me. Thx
This comment was minimized by the moderator on the site
Thanks its good with cellselecting
This comment was minimized by the moderator on the site
Not good QA - check your name on the button. If this is what gets published for the Web community to see, what goes in behind the scenes with the code? :-)
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations