Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default copying sheet

envir excel in office97, winxphome
hi,
i copy one sheet from another but code for commandbutton wont follow.
any tips?
thank you
regards jan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default copying sheet

Jan,

What type of CB is it, forms or control toolbox? I tried both (XP Pro,
XL2000), and they both copied the code, or macro assignment, as well.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jan Eikeland" wrote in message
...
envir excel in office97, winxphome
hi,
i copy one sheet from another but code for commandbutton wont follow.
any tips?
thank you
regards jan




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default copying sheet

its control
reg jan
"Bob Phillips" skrev i melding
...
Jan,

What type of CB is it, forms or control toolbox? I tried both (XP Pro,
XL2000), and they both copied the code, or macro assignment, as well.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jan Eikeland" wrote in message
...
envir excel in office97, winxphome
hi,
i copy one sheet from another but code for commandbutton wont follow.
any tips?
thank you
regards jan






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default copying sheet

Jan,

As I said, when I copied a worksheet the Control CB worksheet code came over
with it.

How did you do the copy?
Where is the code (what code module)?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jan Eikeland" wrote in message
...
its control
reg jan
"Bob Phillips" skrev i melding
...
Jan,

What type of CB is it, forms or control toolbox? I tried both (XP Pro,
XL2000), and they both copied the code, or macro assignment, as well.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jan Eikeland" wrote in message
...
envir excel in office97, winxphome
hi,
i copy one sheet from another but code for commandbutton wont follow.
any tips?
thank you
regards jan








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default copying sheet

hi, heres the sub:

Private Sub CommandButton1_Click()
With Worksheets("Elever")
For Each Cell In .Range(.Cells(1, 7), .Cells(Rows.Count, 7).End(xlUp))
If Not IsEmpty(Cell) Then
Worksheets("Elevmal").Copy After:=Worksheets(Worksheets.Count)
ActiveSheet.Name = Cell.Value
End If
Next
End With
End Sub
"Bob Phillips" skrev i melding
...
Jan,

As I said, when I copied a worksheet the Control CB worksheet code came

over
with it.

How did you do the copy?
Where is the code (what code module)?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jan Eikeland" wrote in message
...
its control
reg jan
"Bob Phillips" skrev i melding
...
Jan,

What type of CB is it, forms or control toolbox? I tried both (XP Pro,
XL2000), and they both copied the code, or macro assignment, as well.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jan Eikeland" wrote in message
...
envir excel in office97, winxphome
hi,
i copy one sheet from another but code for commandbutton wont

follow.
any tips?
thank you
regards jan












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default copying sheet

Are you copying a sheet or copying a range?

If you are using:

ActiveSheet.Cells.Copy
'go to place you want to place you want to paste to, then
Range("A1").Select
ActiveSheet.Paste

You will get only information in the cells, not the command buttons,
and not any code written on the sheet.

On the other hand, if you are using:

Sheets(n).Copy After:=Workbooks("Book2").Sheets(i)

then, you should get all the data and the command buttons, and the code
written on the sheet.


---
Message posted from http://www.ExcelForum.com/

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help Taking alot data from one sheet (if not blank) and copying toa list on another sheet. Alex Zuniga Excel Worksheet Functions 1 November 25th 09 11:54 PM
Copying the repeated data of the previous sheet to the next sheet Sasikiran Excel Discussion (Misc queries) 1 September 25th 07 03:18 PM
Dynamic column chart - copying from Sheet to Sheet. Marko Pinteric Excel Discussion (Misc queries) 1 April 10th 06 12:57 PM
Dynamic column chart - copying from Sheet to Sheet. Marko Pinteric Charts and Charting in Excel 1 April 10th 06 12:57 PM
2 questions, copying data from sheet to sheet and assigning macro Boris Excel Worksheet Functions 0 December 16th 04 06:11 PM


All times are GMT +1. The time now is 02:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"