Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old November 9th, 2004, 10:24 AM
xqqqu xqqqu is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 1 xqqqu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Selection.PasteSpecial problem

I am relatively new to Excel vba programming and have a simple macro that must have a simple fix. Can someone help me?

I want to be able to select a cell, copy its formula, select another cell and run a macro to PasteSpecial the formula's value into that cell (I plan on having it run via a Custom Macro Button (icon)).

When run the macro I recorded (see below) via Tools/Macro/Macros/PasteSpecialValues I get an error message " Run-time error '1004': PasteSpecail method of Range class failed." But when I run the macro via the shortcut key (Ctrl-n) it works just fine. Your help would be appreciated!

Sub PasteSpecialValues()
'
' PasteSpecialValues Macro
' Macro recorded 11/9/2004 by M111526
'
' Keyboard Shortcut: Ctrl+n
'
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub

Reply With Quote
  #2  
Old November 10th, 2004, 10:00 AM
Darius Darius is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 108 Darius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 16 m 54 sec
Reputation Power: 4
Talking

Just maybe the worksheet is not selected.

Reply With Quote
  #3  
Old November 20th, 2004, 10:33 AM
demystify demystify is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 6 demystify User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The maximum number of elements in the array that you can pass to Excel using the Excel Transpose function is 4095. If you exceed this limit, you receive the following error message:
Run-time error '1004':
Transpose method of Application class failed

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Selection.PasteSpecial problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway