اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

سؤال عن AutoFilterMode


الردود الموصى بها

السلام عليكم ورحمة الله وبركاته

أولا: لا اعرف كيفية ادراج ماكرو في المنتدي ، لذلك اضطررت ان أكتبه كتابة هنا واشكر من يدلني على الطريقة

 

ثانيا: اريد ان اتعرف على عامل التصفية المعين حاليا على ورقة العمل برمجيا حتى أتمكن من ارجاعه كما كان بعد ان انتهي من تشغيل ماكرو معين

 

PreviousAutoFilterMode = Worksheets("Sheet1").AutoFilterMode

rem     the result of above line of code will be stored in the variable PreviousAutoFilterMode , the resulting  value will be either True or False


ActiveSheet.AutoFilterMode = False       ' turning off AutoFilterMode

some code
some code
some code

ActiveSheet.AutoFilterMode = PreviousAutoFilterMode

 

rem       the above line of code will return Auto Filter Mode to the previous status either True or False
rem       and In turn, if it was True, then the filter will be set to the first row, A:A


rem       What I need is to set the filter to what it was filtered before turning AutoFilterMode off
rem       I mean , was the previous filter set to row 1 or row 5 or to a specific range of cells , how can I determine that


Appreciate those who can help

 

 

 

رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information