Hi Tomy,

I think the problem is that you have the macro 'Selecting' the range which is 
xlveryhidden.

Such a range can't be seleceted, but XL doesn't have to select a cell to work 
on it.

Try the following code lines instead of what you have.

 

Sub Move_Data()
'
' Move_Data Macro
' Macro recorded 8/26/2009 by Tommy
'
' Keyboard Shortcut: Ctrl+m
'
Selection.Copy
Sheets("Sheet3").Range("A1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Range("B1").Select
End Sub

 

Regards - Dave.



 
> Date: Wed, 26 Aug 2009 17:00:03 -0700
> Subject: $$Excel-Macros$$ Hidden sheets
> From: jntwh...@verizon.net
> To: excel-macros@googlegroups.com
> 
> 
> I have not been successful in move data from one sheet to another when
> the destination sheet (sheet3 in this case) has been hidden using the
> following:
> 
> Sheets ( “sheet3” ) . Visible = x1VeryHidden
> 
> When I unhide sheet3 the following Macro works fine.
> 
> 
> 
> Sub Move_Data()
> '
> ' Move_Data Macro
> ' Macro recorded 8/26/2009 by Tommy
> '
> ' Keyboard Shortcut: Ctrl+m
> '
> Selection.Copy
> Sheets("Sheet3").Select
> Range("A1").Select
> ActiveSheet.Paste
> Sheets("Sheet2").Select
> Application.CutCopyMode = False
> Range("B1").Select
> End Sub
> 
> The error comes up on line 2 having to do with the selection of sheet3
> 
> I’m lead to believe that a sheet hidden in this way is not write-
> protected, thus information transfers in or out can be done.
> 
> Can someone help me on this?
> 
> Tomy
> 
> > 

_________________________________________________________________
What goes online, stays online Check the daily blob for the latest on what's 
happening around the web
http://windowslive.ninemsn.com.au/blog.aspx
--~--~---------~--~----~------------~-------~--~----~
----------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 5,200 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~----------~----~----~----~------~----~------~--~---

Reply via email to