Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
remove msg box prompt
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
remove msg box prompt
On Apr 16, 8:58 am, 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? Hi Put in Application.Displayalerts = False 'your code Application.Displayalerts = True regards Paul |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
remove msg box prompt
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? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
remove msg box prompt
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?" .................................................. ........................centre 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? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
remove msg box prompt
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: ... 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?") .................................................. .......................centre 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? |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
remove msg box prompt
Hello
Provided the lines Application.DisplayAlerts = False and Application.CutCopyMode = False are positioned correctly in your code as I mentioned in my previous reply, I would say no, there should be no need for further specific instructions. But may be someone will provide you with further advice. HTH Cordially Pascal "Junior728" a écrit dans le message de news: ... 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: ... 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?") .................................................. .......................centre 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? |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Remove Prompt to Open File as Read-Only (Excel 2007) | Excel Discussion (Misc queries) | |||
How to remove a query prompt in Excel 2003 | Excel Discussion (Misc queries) | |||
Remove read only prompt | Excel Discussion (Misc queries) | |||
remove enable macro prompt | Excel Discussion (Misc queries) | |||
remove Worksheet using Sh.Delete without prompt | Excel Programming |