View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default remove msg box prompt

Hi
These look like message boxes created by you, not Excel itself, so I
don't think the displayalerts will work on them. The buttons on these
forms call macros, so simply call the macros directly

MacroName parameterlist

where parameterlist is the list of paremeters for the macro to work on
(if any). Delete the message box code and replace with the MacroName
code as above.

regards
Paul

On Apr 16, 10:46 am, Junior728
wrote:
Hi Papou,

These are the 3 msgbox encountered: in my macro

1.save large data on clipboard?
2.save over existing file?
3.Msgbox to inform that a certain file is moved to folder

Do i need to have diff ways for closing each one of them? or is there a
general code to close all msg prompted like this.



"papou" wrote:
Hello
Which message is still popping up during your code?
Please note:
Application.CutCopyMode = False

should be placed immediately after the paste operation in your code ie:


Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


Application.CutCopyMode = False


In addition I would suggest the line
Application.DisplayAlerts = False

to be placed immecdiately before
ActiveWorkbook.SaveAs Filename:= _

"H:\My WorkStation\scraplist.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False


HTH
Cordially
Pascal


"Junior728" a écrit dans le message de
news: 7920C519-CF42-4A92-A683-4533F48AB__BEGIN_MASK_n#9g02mG7!__...__END_MASK_i? ...
Hi,


it doesnt work. The msg prompt still comes up as before. Is there other
methods of deactivating it? OR Did i put in correctly as in my e,g???,:


Sub ScrapInfo()
'Criteria: Need to fill up Col M with WH info first.


Application.ScreenUpdating = False
Application.DisplayAlerts = False 'HOW TO OFF ALL DIALOG BOXES?


Dim LastRow As Long


f$ = InputBox("Pls type FileName", "Input FileName to Open")
g$ = InputBox("Pls type SheetName", "Input SheetName to Open,
RES,CAP,OTHERS?")
.................................................. ........................ce*ntre
of code


Application.CutCopyMode = False
Columns("C:C").Select
Range("C14").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False


ActiveWorkbook.SaveAs Filename:= _
"H:\My WorkStation\scraplist.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False


ActiveWorkbook.Close


Application.DisplayAlerts = False


End Sub


"Mike" wrote:


Try this:-


Application.DisplayAlerts = False


Don't forget to set it back to TRUE at the end of your macro.


Mike


"Junior728" wrote:


Hi,


I am running a macro but it is not running smoothly due to many msg
prompt
boxes appearing to ask to click "Yes","No" etc and there is also
another msg
box that prompted me that there is a large amt of data from clipboard
to be
copied over, and also another msg box that ask me to replace existing
file,
"yes" or "no prompt.


How can i script it so that they will not appear?- Hide quoted text -


- Show quoted text -