Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default disabling a message box

I was wondering if anyone could help me with a macro I'm creating?

I'm trying to disable a message box "Do you want to save changes to
'Consolidated Programs import MONTHLY GL UPLOAD.txt" which pops up when my
macro is running. I want this to automatically default to yes each time the
macro is run. I also want the message box that says "'Consolidated Programs
import MONTHLY GL UPLOAD.txt already exists, do you want to replace it? To
default to yes as well.

Basically, I'm running a open workbook macro in one file to convert the
"Consolidated Programs import MONTHLY GL UPLOAD.xls" to a text file. The
message boxes are stopping the rest of my code from executing.

Any help would be appreciated.

Thanks,

Tim
--
Regards,

timmulla
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default disabling a message box

Wrap your Save/SaveAs method with

Application.DisplayAlerts = False
'Save
Application.DisplayAlerts = True



In article ,
"timmulla" wrote:

I was wondering if anyone could help me with a macro I'm creating?

I'm trying to disable a message box "Do you want to save changes to
'Consolidated Programs import MONTHLY GL UPLOAD.txt" which pops up when my
macro is running. I want this to automatically default to yes each time the
macro is run. I also want the message box that says "'Consolidated Programs
import MONTHLY GL UPLOAD.txt already exists, do you want to replace it? To
default to yes as well.

Basically, I'm running a open workbook macro in one file to convert the
"Consolidated Programs import MONTHLY GL UPLOAD.xls" to a text file. The
message boxes are stopping the rest of my code from executing.

Any help would be appreciated.

Thanks,

Tim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default disabling a message box

Thanks for your help JE McGimpsey!

It solved my first problem successfully. Do you, or anyone else know how to
help me with the second problem? I need to default the following message box
to yes:

A file named "'Consolidated Programs import MONTHLY GL UPLOAD.txt already
exists, do you want to replace it?

I'm going to be replacing the file under the same name each time I use the
macro.

Thanks again for your help!
--
Regards,

timmulla


"JE McGimpsey" wrote:

Wrap your Save/SaveAs method with

Application.DisplayAlerts = False
'Save
Application.DisplayAlerts = True



In article ,
"timmulla" wrote:

I was wondering if anyone could help me with a macro I'm creating?

I'm trying to disable a message box "Do you want to save changes to
'Consolidated Programs import MONTHLY GL UPLOAD.txt" which pops up when my
macro is running. I want this to automatically default to yes each time the
macro is run. I also want the message box that says "'Consolidated Programs
import MONTHLY GL UPLOAD.txt already exists, do you want to replace it? To
default to yes as well.

Basically, I'm running a open workbook macro in one file to convert the
"Consolidated Programs import MONTHLY GL UPLOAD.xls" to a text file. The
message boxes are stopping the rest of my code from executing.

Any help would be appreciated.

Thanks,

Tim


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default disabling a message box

Try this...

x = MsgBox("Default to yes", vbYesNoCancel + vbDefaultButton1, "Default")

Roy
--
(delete .nospam)




"timmulla" wrote:

Thanks for your help JE McGimpsey!

It solved my first problem successfully. Do you, or anyone else know how to
help me with the second problem? I need to default the following message box
to yes:

A file named "'Consolidated Programs import MONTHLY GL UPLOAD.txt already
exists, do you want to replace it?

I'm going to be replacing the file under the same name each time I use the
macro.

Thanks again for your help!
--
Regards,

timmulla


"JE McGimpsey" wrote:

Wrap your Save/SaveAs method with

Application.DisplayAlerts = False
'Save
Application.DisplayAlerts = True



In article ,
"timmulla" wrote:

I was wondering if anyone could help me with a macro I'm creating?

I'm trying to disable a message box "Do you want to save changes to
'Consolidated Programs import MONTHLY GL UPLOAD.txt" which pops up when my
macro is running. I want this to automatically default to yes each time the
macro is run. I also want the message box that says "'Consolidated Programs
import MONTHLY GL UPLOAD.txt already exists, do you want to replace it? To
default to yes as well.

Basically, I'm running a open workbook macro in one file to convert the
"Consolidated Programs import MONTHLY GL UPLOAD.xls" to a text file. The
message boxes are stopping the rest of my code from executing.

Any help would be appreciated.

Thanks,

Tim


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default disabling a message box

Hi Roy,

Thanks for trying to help me out. Unfortunetly, the code you provided me
just created a seperate message box, and didn't default the original to yes.


--
Regards,

timmulla


"Roy Wagner" wrote:

Try this...

x = MsgBox("Default to yes", vbYesNoCancel + vbDefaultButton1, "Default")

Roy
--
(delete .nospam)




"timmulla" wrote:

Thanks for your help JE McGimpsey!

It solved my first problem successfully. Do you, or anyone else know how to
help me with the second problem? I need to default the following message box
to yes:

A file named "'Consolidated Programs import MONTHLY GL UPLOAD.txt already
exists, do you want to replace it?

I'm going to be replacing the file under the same name each time I use the
macro.

Thanks again for your help!
--
Regards,

timmulla


"JE McGimpsey" wrote:

Wrap your Save/SaveAs method with

Application.DisplayAlerts = False
'Save
Application.DisplayAlerts = True



In article ,
"timmulla" wrote:

I was wondering if anyone could help me with a macro I'm creating?

I'm trying to disable a message box "Do you want to save changes to
'Consolidated Programs import MONTHLY GL UPLOAD.txt" which pops up when my
macro is running. I want this to automatically default to yes each time the
macro is run. I also want the message box that says "'Consolidated Programs
import MONTHLY GL UPLOAD.txt already exists, do you want to replace it? To
default to yes as well.

Basically, I'm running a open workbook macro in one file to convert the
"Consolidated Programs import MONTHLY GL UPLOAD.xls" to a text file. The
message boxes are stopping the rest of my code from executing.

Any help would be appreciated.

Thanks,

Tim



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default disabling a message box

If the message box is produced by code in the workbook you are opening, then
you can suppress that code from running

Application.EnableEvents = False
' open and process the workbook
Application.EnableEvents = True

--
Regards,
Tom Ogilvy

"timmulla" wrote in message
...
Hi Roy,

Thanks for trying to help me out. Unfortunetly, the code you provided me
just created a seperate message box, and didn't default the original to

yes.


--
Regards,

timmulla


"Roy Wagner" wrote:

Try this...

x = MsgBox("Default to yes", vbYesNoCancel + vbDefaultButton1,

"Default")

Roy
--
(delete .nospam)




"timmulla" wrote:

Thanks for your help JE McGimpsey!

It solved my first problem successfully. Do you, or anyone else know

how to
help me with the second problem? I need to default the following

message box
to yes:

A file named "'Consolidated Programs import MONTHLY GL UPLOAD.txt

already
exists, do you want to replace it?

I'm going to be replacing the file under the same name each time I use

the
macro.

Thanks again for your help!
--
Regards,

timmulla


"JE McGimpsey" wrote:

Wrap your Save/SaveAs method with

Application.DisplayAlerts = False
'Save
Application.DisplayAlerts = True



In article ,
"timmulla" wrote:

I was wondering if anyone could help me with a macro I'm creating?

I'm trying to disable a message box "Do you want to save changes

to
'Consolidated Programs import MONTHLY GL UPLOAD.txt" which pops up

when my
macro is running. I want this to automatically default to yes

each time the
macro is run. I also want the message box that says

"'Consolidated Programs
import MONTHLY GL UPLOAD.txt already exists, do you want to

replace it? To
default to yes as well.

Basically, I'm running a open workbook macro in one file to

convert the
"Consolidated Programs import MONTHLY GL UPLOAD.xls" to a text

file. The
message boxes are stopping the rest of my code from executing.

Any help would be appreciated.

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
Disabling updatelinks Dave Excel Discussion (Misc queries) 0 April 27th 06 12:05 PM
Displaying a message in a message box without requiring user to click anything to proceed Android[_2_] Excel Programming 2 June 25th 04 06:44 PM
Disabling Alt+F11 richard_b2004 Excel Programming 3 May 17th 04 06:32 PM
Question about disabling message boxes if possible TBA[_2_] Excel Programming 1 January 18th 04 12:52 AM
Disabling the Update links message L Buchy Excel Programming 2 July 23rd 03 06:38 PM


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

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

About Us

"It's about Microsoft Excel"