Thread: Paste special
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Sandy Mann Sandy Mann is offline
external usenet poster
 
Posts: 2,345
Default Paste special

Hi Pietro.

You don't have to activate the Italian sheet to paste to it, assuming that
you want to copy one cell and paste it into the first enpty cell in Column C
then try:

Option Explicit
Sub PasteIt()
Dim cValue As Double
Dim nFormat As String
Dim Here As Long

cValue = ActiveCell.Value
nFormat = ActiveCell.NumberFormat


With Sheets("Italian")
Here = .Cells(1, 3).End(xlDown).Row + 1
.Cells(Here, 3).Value = cValue
.Cells(Here, 3).NumberFormat = nFormat
End With
End Sub


If you do really want to activate the sheet then use:

Sub PasteIt2()
Dim cValue As Double
Dim nFormat As String
Dim Here As Long

cValue = ActiveCell.Value
nFormat = ActiveCell.NumberFormat


Sheets("Italian").Activate
Here = Cells(1, 3).End(xlDown).Row + 1
Cells(Here, 3).Value = cValue
Cells(Here, 3).NumberFormat = nFormat
End Sub

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Pietro" wrote in message
...
Hi,

I need a code to activate a tab named "Italian",then to select the first
empty row in column C ,then to paste special "Values and numbers format"..
Is it possible?