كلمة VBA عدد البدل
سؤال
مرحبا لدي الرموز أدناه التي تعمل بالفعل تماما.ما لا يمكنني معرفةه هو كيفية حساب عدد المرات التي يجد فيها البحث عن البدل تطابقا.هل يمكن لأحد أن يقول لي كيف يمكنني الذهاب حول هذا؟الرموز هي كما يلي: giveacodicetagpre.
أي مساعدة سوف تكون موضع تقدير كبير.شكرا يا شباب!
المحلول
I think you just need a static Counter field defined at the top of your module - i.e. not within any sub or function (which is what makes it static):
dim MatchCounter as long
Just initialize to zero at the appropriate place and have your matching function increment on each match. (Could also wrap this in a small Class if the initialization logic / update logic is spread around & hard to pin down).
لا تنتمي إلى StackOverflow