473,569 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I am trying to write code to prompt a user then copy and paste.

3 New Member
I am trying to write code to copy and paste a worksheet from one workbook to another. The thing I cannot figure out is how to reference the workbook to be copied because the name will be different when this macro is run, as it is for monthly reporting. The workbook it is to be copied into is titled Monthly TAC Builder, sheet is Last Month. I dont know how to write the code without a certain name for my sheet to be copied from.

Thanks
Jul 13 '10 #1
1 1325
Guido Geurs
767 Recognized Expert Contributor
Attached is an example how You can copy a sheet from an other workbook.(This is only for testing the code) !

how it works:
- Open de file Book1.xls
- select a date in cells A1...A5
- click on Commandbutton1
Jul 16 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
32911
by: Faith | last post by:
Hello. I need to take a column from Excel(unknown amount of rows) that will be selected by the user and copy those cells. Then I will need to paste those cells into the first column in a Data Grid (system.windows.forms). Basically, the user receives a list of clientIDs from a client as an email attachment in Excel listed like: 1234 ABC...
4
21596
by: Legendary Pansy | last post by:
I was checking out the 101 C# Samples, specifically Windows Forms - Use the Clipboard. I took a look at the code for a while, and I understand what the program is doing with the cut, copy, pasting via the file menu events using the clipboard. However, what I don't get is how is the program able to produce a context menu in the textbox area. When...
3
2386
by: Rachel Suddeth | last post by:
This may not be the right forum, but it's a problem I chiefly come across when trying to post here. When I do a copy/paste from VS, the text always looks really weird (and even if I'm in an editor that's supposed to be doing plain text, it looks like it's in a different font -- and of course you can't change the font in a plain text...
2
35210
by: Mansi | last post by:
I'm trying to automate excel from c#. One of the things I need to do is to copy/paste/insert rows in excel via c# code. I tried to do the following: 1) Select a row in excel (a12 to k12) 2) Insert a row. 3) copy contents of a12 to k12. 4) Paste these contents to new row. The "Record Macro" function returns the following code:
9
3067
by: Collin Jamieson | last post by:
how can I write functions to cut, copy & paste the currently selected text. this is new to me any code examples would be great. thanks CJ
2
1551
by: Max81 | last post by:
Im trying to build a calculator for an assignment! (due wednesday) im having trouble finding any code for creating Copy/Paste menu buttons (just need the "doing" code) can anyone help? in addition, how do you get the keyboard numbers to activate the "calculator" buttons. (not as important)
7
11608
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard is proving to be more difficult. These pictureboxes are bound to an AccessDB. If the user wants to add an image, they select an image using an...
5
1618
by: DigitalGENOcyde | last post by:
I am fairly new to working with programming so pardon my lack of knowledge, but I was hoping someone could assist me with working on a project. I am trying to make a Windows application using Visual Basic 2005 Express, and am wanting to have a menu bar with one of the drop downs being similar to that of the "Edit" drop down in most any other...
17
5460
by: emma.sax | last post by:
Hi all, I have a form where we would like the user to input their email address twice, to ensure they've typed it correctly, as is found on most sign-ups I'm looking for a solution to the problem where a user (and me it has to be said) just either highlights the email address with their mouse (or Ctrl-A) and then Ctrl-C, Ctrl-P (or...
18
9602
by: Archanak | last post by:
Hi, I have a text box and should allow user to type the text but not to allow them to copy/paste or right click. Here is the code. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title>
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.