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


I am running a macro that prompts asking if you would like to keep the
data on the clipboard. The answer always needs to be yes and I was
wondering is there code I can add to my macro that will automatically
answer this question yes instead of prompting the user for the answer?

Thanks for your help.


--
miwarren
------------------------------------------------------------------------
miwarren's Profile: http://www.excelforum.com/member.php...o&userid=24682
View this thread: http://www.excelforum.com/showthread...hreadid=437380

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro help...


Comment out the line(s) of code that triggers off the message.


--
davidm
------------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=437380

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro help...


davidm Wrote:
Comment out the line(s) of code that triggers off the message.


I don't have a code to trigger the prompt. Below is the code where the
prompt takes place.

Workbooks.Open Filename:="I:\SECURED\B&H Reconciliations\" &
Range("K5").Value & ".xls"
Selection.Copy
ActiveWindow.Close
Sheets("Submit").Select
ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, _
DisplayAsIcon:=False

After the activewindow.close it then issues the prompt.

Thanks for the advice!

More help needed please...


--
miwarren
------------------------------------------------------------------------
miwarren's Profile: http://www.excelforum.com/member.php...o&userid=24682
View this thread: http://www.excelforum.com/showthread...hreadid=437380

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro help...


After Selection.copy, insert

Application.DisplayAlerts=False


and before *End Sub*, close off with
Application.DisplayAlerts=True

-------------------------------------------------------------------------------
Workbooks.Open Filename:="I:\SECURED\B&H Reconciliations\"
Range("K5").Value & ".xls"
APPLICATION.DISPLAYALERTS=FALS
Selection.Copy
ActiveWindow.Close
Sheets("Submit").Select
ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, _
DisplayAsIcon:=False

...... ....... ........
...... ....... .........

APPLICATION.DISPLAYALERTS=TRU
End Su

--
david
-----------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...fo&userid=2064
View this thread: http://www.excelforum.com/showthread.php?threadid=43738

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro help...


Thanks so much!!!


--
miwarren
------------------------------------------------------------------------
miwarren's Profile: http://www.excelforum.com/member.php...o&userid=24682
View this thread: http://www.excelforum.com/showthread...hreadid=437380



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Macro help...

Hi Davidm,

I have the same problem, but as I am not a programmer, I couldn't understand
your answer here. would you kindly explain what shall I do to stop the code
that triggers this message?

Thanks in advance
Hoshyar

"davidm" wrote:


Comment out the line(s) of code that triggers off the message.


--
davidm
------------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=437380


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro help...


Hoshyar Wrote:
Hi Davidm,

I have the same problem, but as I am not a programmer, I couldn'
understand
your answer here. would you kindly explain what shall I do to stop th
code
that triggers this message?

Thanks in advance
Hoshyar



Hello Hoshyar,

Here is how I corrected the problem. You will need to find the cod
listed below:

ACTIVEWINDOW.CLOS

Then surround it by these two tags:

APPLICATION.DISPLAYALERTS=FALSE

APPLICATION.DISPLAYALERTS=TRU

So it should look like this:

APPLICATION.DISPLAYALERTS=FALSE
ACTIVEWINDOW.CLOSE
APPLICATION.DISPLAYALERTS=TRU

I hope this helps... It did for me

--
miwarre
-----------------------------------------------------------------------
miwarren's Profile: http://www.excelforum.com/member.php...fo&userid=2468
View this thread: http://www.excelforum.com/showthread.php?threadid=43738

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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 09:11 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"