Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Suppressing Msgbox during Testing

Tim,

For a multi-user (LAN) environment, I usually set a public variable
such as Public TestMode as Boolean and set it via my UserName.
If Application.UserName = "John Wilson" Then TestMode = True
Then when I put my message boxes in, I preface them all with
If TestMode = True Then MsgBox "blah, blah, blah"
I do the same with subroutines that aren't quite ready for prime time.
In a single user environment, you could just go into the VBA editor
and set TestMode to true whenever you want to test.
Easiest thing about doing it this way is that you can leave the
message boxes there for later testing and they won't affect anyone.
Just a thought. I'm sure there are many other ways.

John

Tim Childs wrote:

Hi

Please can someone provide a code snipprt or an idea to solve this neatly

I have a utility that does some predetermined formatting on generic
worksheets. In normal use it is used on ONE sheet at a time by the user.
S/he may then use it later on another sheet.

I want to test modifications against a set of sheets in a workbook
consecutively in one go, which is fine but the routine itself has a MSGBOX
command in it if it finds a particalar condition. I need to suppress this in
the multi-sheet test. Otherwise it will be stopping unnecessarily as I would
test that Msgbox condition independently.

Can someone provide a suggestion,pl?

Pl post back if above is not clear enough to enable a response.

Thanks

Tim


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suppressing detail rows da Excel Discussion (Misc queries) 1 January 13th 09 12:59 AM
Suppressing screen tips Wiz1214 Excel Discussion (Misc queries) 2 June 27th 07 08:52 PM
Suppressing print dialogue box sgrech Excel Discussion (Misc queries) 0 September 24th 05 12:14 PM
Hi all!! Suppressing the "Do you want to save changes" Bony Pony Excel Worksheet Functions 2 February 2nd 05 11:39 AM
suppressing the splash screen bullseye Excel Discussion (Misc queries) 4 January 5th 05 05:39 PM


All times are GMT +1. The time now is 02:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"