EXCEL 2007 - 需要帮助创建一个按钮,它将活动工作表的内容粘贴到一个新的工作表中 [英] EXCEL 2007 - Need Help creating a button which takes the contents of active worksheet and pastes it in a new worksheet

查看:219
本文介绍了EXCEL 2007 - 需要帮助创建一个按钮,它将活动工作表的内容粘贴到一个新的工作表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在整个网站上搜索找到我的问题的答案,大多数相关的解决方案是一个更复杂的问题。这是我需要做的。我在Excel 2007中创建了一个简单的窗体。我正在寻找能够在窗体底部添加一个按钮,允许用户单击按钮并将该工作表复制到同一个excel文档中的新工作表。基本上只是复制活动工作表。

I have search throughout this site to find a answer to my problem and most of the related solutions are for a far more complicated problem. Here is what I need to have done. I created a simple form in Excel 2007. I am looking for the ability to add a button at the bottom of the form which allows the user to click on the button and copy that worksheet into a new worksheet within the same excel document. Basically just duplicating the active worksheet.

我试图用宏来做,但没有得到所需的结果,我们的大多数同事仍然使用Excel 2003,所以我不知道宏是否会工作在老版本的excel。我不知道任何VBA,这是为什么我来这里寻求你的帮助。

I tried to do it with macros but did not get the desired results, and most of our co-workers still use Excel 2003 so I am not sure if macros will work in the older version of excel. I do not know any VBA which is why I come here in search of help from you all.

这样回顾。


  1. 在活动工作表底部有一个简单表单和命令按钮的一张Excel文档

  2. 命令按钮复制和粘贴

  3. 如果可能的话,可以同时在Excel 2003和2007中使用的解决方案。

感谢所有愿意帮助新手Excel用户的人。

Thanks so much ahead of time for anyone who is willing to help out a Novice Excel User.

推荐答案

假设你知道如何添加一个按钮这里是一个简单的代码行复制活动工作表:

Assuming that you know how to add a button here is a simple line of code to duplicate the active worksheet:

Sub Button1_Click()
    ActiveSheet.Copy after:=ActiveSheet
End Sub

这篇关于EXCEL 2007 - 需要帮助创建一个按钮,它将活动工作表的内容粘贴到一个新的工作表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆