If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Macro & Clipboard

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-10-04, 13:53
qimel qimel is offline
Registered User
 
Join Date: Feb 2004
Location: USA - California
Posts: 21
Macro & Clipboard

I have a macro that copy/paste special values from a csv file into a excel workbook. After every page it asks me if I want to save the info on the Clipboard. What statement or option can I put into the macro so I don't have to keep clicking NO when the box pops up? Here is part of the macro where I think the code or option needs to go in....I just don't know what it is.....
Range("A1:EZ20").Select
Selection.Copy
Windows("Data.xls").Activate
Sheets("R0001").Select
ActiveWindow.ScrollColumn = 1
Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("R001").Activate
ActiveWindow.Close
Application.CutCopyMode = False
Range("A1").Select

Thank you,
Melinda
Reply With Quote
  #2 (permalink)  
Old 03-10-04, 14:19
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
Code:
Application.DisplayAlerts False
Then be sure to include this immediately following the code, or you won't ever get the alerts in this macro.

Code:
Application.DisplayAlerts True
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #3 (permalink)  
Old 03-10-04, 14:48
qimel qimel is offline
Registered User
 
Join Date: Feb 2004
Location: USA - California
Posts: 21
Quote:
Originally posted by shades
Code:
Application.DisplayAlerts False
Then be sure to include this immediately following the code, or you won't ever get the alerts in this macro.

Code:
Application.DisplayAlerts True


Works like a charm......after adding in the "=" sign :-)
Thank you!!!
Application.DisplayAlerts = False
Application.DisplayAlerts = True

Melinda
Reply With Quote
  #4 (permalink)  
Old 03-10-04, 14:57
qimel qimel is offline
Registered User
 
Join Date: Feb 2004
Location: USA - California
Posts: 21
Quote:
Originally posted by shades
Code:
Application.DisplayAlerts False
Then be sure to include this immediately following the code, or you won't ever get the alerts in this macro.

Code:
Application.DisplayAlerts True


Works like a charm......after adding in the "=" sign :-)
Thank you!!!
Application.DisplayAlerts = False
Application.DisplayAlerts = True

Melinda
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On