Thread: hide sheet
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default hide sheet

hi,
with the code you have, it assumes that your are talking about the current
sheet. to do something on another sheet, you have to specify which sheets.

Sub copyit()
Activeworkbook.sheets("sheet1").select
ActiveWorkbook.Sheets("sheet2").Range("A1").Copy
ActiveWorkbook.Sheets("sheet2").Range("A2").PasteS pecial xlPasteAll
End Sub

regards
FSt1
"geebee" wrote:

hi,

i have some programming in sheet1 like:

range("A1").select
selection.copy
range("C1").select
selection.paste

right now the code only works if i make the code go to the sheet firt like:
sheets("sheet1").select

i would like to know how i can stay on my current sheet_new and have the
code execute without having to actually go to or put focus on sheet1 as made
possible by the sheets("sheet1").select


thanks in advance,
geebee