Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Display variable value in OnScreenDisplay function?
#1
Hi All!
This line works perfectly for me:
 
Code:
Copy      Help
OnScreenDisplay "All inactive VBA Modules have been closed" 1 -50 -50 "Calibri" 0 0xff0000 2

Still, I'd like it to display how many modules have been closed, something like:
 
Code:
Copy      Help
_i = 3
OnScreenDisplay "_i inactive VBA Modules have been closed" 1 -50 -50 "Calibri" 0 0xff0000 2

Is it possible?
Seems like OnScreenDisplay only accepts fixed text string values for displayed notifications...
Hope, I'm wrong!

Thank you for your help!
#2
Code:
Copy      Help
F"{_i} inactive VBA Modules have been closed"
#3
Oh, boy!
I did try to use the F operator, but the syntax was wrong, so it didn't work for me...
Thank you, Gintaras!
#4
i use this often
Quote:int i = 3
str s = s.format("%i inactive VBA Modules have been closed" i)
OnScreenDisplay s 1 -50 -50 "Calibri" 0 0xff0000 2


Forum Jump:


Users browsing this thread: 1 Guest(s)