Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Easy VBA Syntax Question


I have a macro that pauses for a user response. A dialog box comes u
saying "The selection contains multiple data values. Merging into on
cell will keep the upper-left most data only." At this point, I can hi
OK and it will continue.

How can I automate this so it automatically selects OK?

Thank you

--
Hul
-----------------------------------------------------------------------
Hulk's Profile: http://www.excelforum.com/member.php...fo&userid=1494
View this thread: http://www.excelforum.com/showthread.php?threadid=26895

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Easy VBA Syntax Question


Place the following around your code that does the merge:

Application.DisplayAlerts = False

'Your Code

Application.DisplayAlerts = True



--
kkkni
-----------------------------------------------------------------------
kkknie's Profile: http://www.excelforum.com/member.php...nfo&userid=754
View this thread: http://www.excelforum.com/showthread.php?threadid=26895

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Easy VBA Syntax Question

I think this is how it works...

MsgBox "This is default button",vbYesNo + vbDefaultButton2,"Try It N See"

vbDefaultButton2 designates the second button (NO) as the default button.

doco

"Hulk" wrote in message
...

I have a macro that pauses for a user response. A dialog box comes up
saying "The selection contains multiple data values. Merging into one
cell will keep the upper-left most data only." At this point, I can hit
OK and it will continue.

How can I automate this so it automatically selects OK?

Thank you!


--
Hulk
------------------------------------------------------------------------
Hulk's Profile:
http://www.excelforum.com/member.php...o&userid=14947
View this thread: http://www.excelforum.com/showthread...hreadid=268956



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Easy VBA Syntax Question

oops! Misunderstood the question ... sorry.

"Don Cossitt" wrote in message
...
I think this is how it works...

MsgBox "This is default button",vbYesNo + vbDefaultButton2,"Try It N See"

vbDefaultButton2 designates the second button (NO) as the default button.

doco

"Hulk" wrote in message
...

I have a macro that pauses for a user response. A dialog box comes up
saying "The selection contains multiple data values. Merging into one
cell will keep the upper-left most data only." At this point, I can hit
OK and it will continue.

How can I automate this so it automatically selects OK?

Thank you!


--
Hulk
------------------------------------------------------------------------
Hulk's Profile:
http://www.excelforum.com/member.php...o&userid=14947
View this thread:
http://www.excelforum.com/showthread...hreadid=268956





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Easy VBA Syntax Question

If you want it to automatically select OK, why have the dialog box at all?

--

HTH

RP

"Hulk" wrote in message
...

I have a macro that pauses for a user response. A dialog box comes up
saying "The selection contains multiple data values. Merging into one
cell will keep the upper-left most data only." At this point, I can hit
OK and it will continue.

How can I automate this so it automatically selects OK?

Thank you!


--
Hulk
------------------------------------------------------------------------
Hulk's Profile:

http://www.excelforum.com/member.php...o&userid=14947
View this thread: http://www.excelforum.com/showthread...hreadid=268956





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
Syntax question BigDave63 Excel Worksheet Functions 4 February 5th 09 06:50 PM
VBA syntax question Matt Excel Discussion (Misc queries) 2 December 5th 07 03:08 PM
syntax question Giselle Excel Worksheet Functions 4 January 29th 06 01:59 AM
new user with easy question? not easy for me speakeztruth New Users to Excel 5 June 3rd 05 09:40 PM
Syntax question Stuart[_5_] Excel Programming 3 December 3rd 03 08:45 PM


All times are GMT +1. The time now is 06:01 PM.

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"