Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel sheet copy problem
Hi,
Iam trying to copy a sheet using VBA, but in vain, The code is very simple as below, Sheets("Sheet1).Copy After:=Sheets(Sheets.Count) But the execution bombs out without any error notification. When i try to debug and step thru, after this line gets executed, the execution comes out without any indication of error. Further statements are not executed and the copy operation does not take place. Is something wrong with the way iam trying to copy a sheet? I need to copy the sheet as the sheet contains some form objects(like buttons) and i found that it was quite a hassle to add a new sheet, move the text, create form objects on the new sheet and most importantly add the handling code for the forms. I thought i would create a sheet as a template in the same workbook and copy and create a new sheet as and when required. But a simple thing (or i think so) as this is not working. Can someone help me out? Using Excel 2002 regards thulasi |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel sheet copy problem
Teh line should be highlighted in red in the VB editor because you are
missing the second ". The line should read Sheets("Sheet1").Copy After:=Sheets(Sheets.Count) not Sheets("Sheet1).Copy After:=Sheets(Sheets.Count) -- HTH... Jim Thomlinson " wrote: Hi, Iam trying to copy a sheet using VBA, but in vain, The code is very simple as below, Sheets("Sheet1).Copy After:=Sheets(Sheets.Count) But the execution bombs out without any error notification. When i try to debug and step thru, after this line gets executed, the execution comes out without any indication of error. Further statements are not executed and the copy operation does not take place. Is something wrong with the way iam trying to copy a sheet? I need to copy the sheet as the sheet contains some form objects(like buttons) and i found that it was quite a hassle to add a new sheet, move the text, create form objects on the new sheet and most importantly add the handling code for the forms. I thought i would create a sheet as a template in the same workbook and copy and create a new sheet as and when required. But a simple thing (or i think so) as this is not working. Can someone help me out? Using Excel 2002 regards thulasi |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel sheet copy problem
Sorry, Typo while posting here.
Actual code is like what u have specified Sheets("Sheet1").Copy After:=Sheets(Sheets.Count) and the problem occurs. Any ideas? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel sheet copy problem
Depending what you are up to you may be running into a known issue...
http://support.microsoft.com/default...b;en-us;210684 -- HTH... Jim Thomlinson " wrote: Sorry, Typo while posting here. Actual code is like what u have specified Sheets("Sheet1").Copy After:=Sheets(Sheets.Count) and the problem occurs. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy Sheet problem | Excel Programming | |||
Problem: How to copy excel sheet in C++ | Excel Programming | |||
This'll stump you! Problem with Copy Sheet between Excel versions | Excel Programming | |||
Copy sheet problem | Excel Programming | |||
Copy Sheet Problem | Excel Programming |