Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

(80% Discount Ends Soon!)

Close Window (X)   
Excel VBA Course
[80% Discount] Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

(80% Discount Ends Today!)

Vba To Paste Multiple Items From Ms Clipboard



Apologies if this has been asked before and it can't be done, but, I'm trying to automate the following (I'm not a great VBA user, I'm afraid)

Step One
Copy item 1 from Outlook email to MS clipboard
Copy item 2 from Outlook email to MS clipboard
Copy item 3 from Outlook email to MS clipboard
Copy item 4 from Outlook email to MS clipboard
Copy item 5 from Outlook email to MS clipboard

Step Two
Paste Item 1 into selected cell (this varies with each running of the script and will be manually selected)
Paste Item 2 into Cell one to the right of the above
Paste Item 3 into Cell one to the right of the above
Paste Item 4 into Cell one to the right of the above
Paste Item 5 into Cell one to the right of the above
Clear clipboard

If I record it as a macro the script simply pastes the text as it was initially recorded rather than the current contents of the clipboard, which changes each time.
I have to do this 500 times

To do it manually requires approximately 30 mouse and keyboard actions and takes me nearly 2 days to complete. Clearly any automation I can incorporate will help greatly.
I expect to have to carry out step one manually, but if anyone can help with part two you'll earn my eternal gratitude.

Cheers
Tom

Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons 50+ Hours of Instruction 200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

(80% Discount Ends Soon!)

View Course




Similar Topics







We have a number of Excel users in our office who cannot copy and paste
between Excel workbooks. They can copy and paste between worksheets. When
you highlight the section to copy and then go to the new workbook both the
paste
and paste special are "grayed out". This is true whether you right-click the
mouse, go to the edit menu, or use control keys. This occurs with any data
type and the most simple workbooks. I have seen some suggestions here but
none have worked for this particular problem. I have reset the menus and
renamed the .xlb files and neither helps. You can open the clipboard and the
paste will work, but there is no paste special option. Any help would be
greatly appreciated. Thanks!






In my Excel spreadsheet I have a column to store the email addresses of my clients. Every time I click on the text of an email address, it automatically opens Outlook with a new message composed to that address. How do I stop this from happening? I don't even use Outlook for my email and this is really frustrating. I've tried changing the format of the column to no avail.

Thank you; your help is most appreciated.


Hi All,

I have the below code which deletes all items from a listbox and my excel sheet which is the source for populating that listbox. I am using a option button style for my listbox and the selection style as single .i.e. you can select only one item at one go in the lisbox. I want my macro to delete the selected item from my worksheet .i.e. it's entire row so that it doesn't reflect in my lisbox any more. Below is my code :

Code:

Private Sub CommandButton2_Click()
 'REMOVE SELECTION
 
  Dim I As Long
 
    With ListBox1
      For I = .ListCount - 1 To 0 Step -1
       If .Selected(I) Then
           .RemoveItem I
           Sheets("URL List").Rows(I + 2).EntireRow.Delete
           
        End If
      Next I
    
End With

End Sub


Thanks a lot for your help in advance.


Hi
I am a new user and trying to setup a database in excel. I can select all addresses and copy but when trying to paste into excel it does so in 1 cell.

Is there a way I can paste the separate email id's into individual cells so I don't have to do it individually?

Many thanks
Patrick


Is there a trick to copy-paste a group of cells into Outlook? I don't want to paste as a picture (shows up as an attachment and is lost when someone else Replies), but formatting is skewed when pasted as an Excel object. Right now I'm recreating the table in Word, then pasting, which doesn't loose formatting.

A specific problem is cells which don't have borders show up with very light grey borders in Outlook. This, I do not want.

TiA


If I am using sendmail in a simple macro, is there any code I can add to actually open Outlook?

Some users of the macro are pressing the macro button and do not have Outlook open so the email isn't sent until they eventually open Outlook!

Thanks in advance


I am trying to insert a range of cell in the body of an outlook email with the same format. The code I am using now is below and it does insert anything in the email body.

Code:

Sub Mail()
Dim OutApp As Object
    Dim OutMail As Object
    Set OutApp = CreateObject("Outlook.Application")
    OutApp.Session.Logon
    Set OutMail = OutApp.CreateItem(0)
    On Error Resume Next
    With OutMail
        .To = "cbelcher@jpfryelaw.com"
        .CC = ""
        .BCC = ""
        .Subject = "Burden Report"
        .Body = ActiveSheet.Range("A1:D12")
        .Attachments.Add ("C:\Documents and   Settings\cbelcher\Desktop\Burden Report.xls")
End With
    On Error GoTo 0
    Set OutMail = Nothing
    Set OutApp = Nothing
    Set objMsg = Nothing
End Sub





hi,

I would like a formula that would list all the items in row B that match the criteria in row A. the first cell with formula would list the first item, the second cell with the formula would list the next item, and so forth. Also, column B might have a duplicates that should be listed. Is this possible? I cannot manipulate the order of the original items (ie, filters) because this data is being used to derive other formulas.


I am trying to do a very simple copy and paste of a simple formula in Excel 2007 and nothing seems to be working. Excel will not let me copy and paste a formula and will only paste the value into to workbook. For instance, if I make a very simple spreadsheet such as:
A1 type in 10, A2 type in =A1 (calculated A2 to be 10)
B1 type in 5

And then click the copy on B1, and then click paste special on cell B2, the only options it gives me are text and unicode text and so no matter how I paste, cell b2 will always be populated with a value of 5. I cannot imagine a simpler copy and paste and no matter what I do I can't make this work.
All cells are formatted as general. It seems that all copy and pasting of formulas in my excel has been disabled. If I open any spreadsheet on my computer, I can't copy and paste formulas, but do the exact same thing on the exact same spreadsheet on any other computer and it works no problem.

Any help?


Hey all,

How do you turn off the blinking border around a cell that you are copying while still having it as an active cell? I don't want to have to press "esc" after everytime I copy an item.

Thanks,
Jeremy


Hi,

I use filters a lot at my work. One thing I've noticed is that if I have something filtered and want to copy and paste only what I see from one column to another column right next to it, it will copy what is filtered, but then paste into the unfiltered portion.

Is there some way to copy only what I see when it's filtered, THEN paste only onto the adjancent cells which is also filtered?

For example let's say i have each of the number below in a cell (Fig 1). And then I hide rows 2 -3, so only 1 and 4 is showingI only see 1 & 4 in column A. I want to copy and paste 1 and 4 to the next column over one row so it looks like Fig. 2 when unhidden. Not like Fig. 3.

Fig. 1

1
2
3
4

Fig. 2

1 1
2
3
4 4

Fig. 3
1 1
2 4
3
4


Hey guys,

I want to know how to copy part of a cell and paste it into a new cell.

Example:

a1= 8hAs7c

portion needed: 7c


I used this formula:

=RIGHT(A1,2)

This returns 7c like I want.

However in the next cell I want to source the middle two (As)

And in another cell I want the first two (8h)

How do I go about this?


I did a search in here but didn't find an answer so here goes nothing...

I have a spreadsheet with data from A1 to H1 down to A275 to H275. I select all of it, Copy, go into the Sheet2 tab and select A1, Paste Special -> Transpose and it give me the following error message:
Quote:

The information cannot be pasted because the Copy area and the paste area are not the same size and shape. Try one of the following:
- Click a single cell, and then paste.
- Select a rectangle that's the same size and shape, and then paste.

For the life of me, I can't figure out why it's not working! I have done this many times with other spreadsheets. Has anyone ever experienced this? If so, were you able to resolve it and how?

Many Thanks,
Mike


Suddenly, I lost the ability to use copy and paste by right clicking my
mouse. Using Office 2000. Can you help? Thank you!!!



Hi guys,

Looking for some help and would appreciate your help. I want to prevent people cutting/copy/pasting on a spreadsheet I have developed. A couple of users keep doing so which in turn knackers my formulas. There will be occasions where I will need to be able to use these functions for maintenance and updates. Ideally I would like have a private marcro which I can run to enable these features as and when needed.

I've been at this all morning and feel like I'm going round in circles. I've tried various bits of code (sourced via google etc) & have ended up with a whole manner of outcomes but not the one I want.

To summaraise what I am looking for is some vba code which will do the following Disable cut,copy and paste when sheet is opened Enable cut,copy and paste when closed Have a macro which when run will allow me to cut/copy paste so as to implement updates when necessary.
Can anyone help?

Thanks in advance


Hey there,

I have been tasked with introducing userforms into an excel sheet and tbh I'm quite amazed that excel has this capability of adding userforms to excel sheets.

Anyway, I have 2 columns of data in an excel sheet and I wish to add this to a userform so that the userform displays the 2 columns beside each other with headings, like a table. The user should then be able to select a particular row and insert it into the specified cell.

I would also like the user to select a row on the table and then be able to bring up another table depending on the row selected...basically so that the user can draw deeper into the information that they require.

I have an example excel sheet where I have 2 sheets. One sheet is the user entry sheet called User Entry Screen. the next sheet is the tables sheet where my tables are held. Once the user selects the cell shown in the example sheet, it should then bring up the user form. the user then, depending on which item clicked, then gets shown the next window with a table and info on it. then user should then be able to select an item and the cells on the user entry screen would then get populated.

Personally I think this is a really tricky challenge and any help with doing this would be extremely appreciated.

I'll post up further comments as I am trying to work my way through it!

Thanks,

Jag


I was testing the following methods (suggested in another thread) to disable copy/paste on a particular worksheet -- now copy and paste is disabled entirely from Excel and, apparently, from each and every excel workbook I've got. HELP!!!!!

http://www.xcelfiles.com/VBA_Quick13.html

http://www.mrexcel.com/archive2/75500/87639.htm



Taxstar


When using the copy and paste function it is extremely slow to paste the
result. Also the file size seems to be increasing to a much larger size for
no reason.
Any feedback would be appreciated.



I am trying to automatically capture and record the date of a cell's last change in value (date stamp). I have an item price list and if a particular cell gets updated I want to automatically record the date of change of that cell. I realize that after I change cell A1 I could tab to cell B1 and enter Ctrl+; but if I have a hundred new prices to enter I don't want to do that (plus me or the data entry person might forget).

For instance,

A B
1 $32.17 8/17/08
2 $43.20 9/12/09

If I go in and update cell A1 to $33.98 today I would like cell B1 to read 2/16/10. But I don't want cell B2 to change.


Thanks


Posted this on the Ozgrid forums, but haven't gotten any help yet, so I thought I'd try here too!

I've been having a strange problem lately. I have a fairly lengthy macro that works perfectly most of the time. Occasionally it will run as expected but as soon as the macro ends, excel becomes unresponsive to mouse-clicks. When I click anywhere (trying to select a cell, or an excel menu item...clicking anywhere in excel) I'll get the a 'ding' system sound and nothing will happen. BUT, if I use the keyboard arrow keys, I can see that the active cell selection moves accordingly. Then it gets really strange - when I have a cell highlighted and press any key to input text, it gets duplicated. So if I press "s' it will input "ss" into the cell, and then when I press enter it will auto-move to the next cell down, but nothing ends up getting saved into the previous cell.

I don't understand what's going on at all. I can't think of anything in my macro that would have these kinds of effects. I've made sure that screenupdating is turned back on at the end of every procedure. If I go into the VBE, I can manually run procedures and they all work fine. The only way I've been able to get back to normal is by force closing excel altogether and re-opening. Any ideas?

______________________

Still having trouble, and the same thing is happening with this workbook on two different computers, so I don't think it's a hardware, or OS specific issue. When it gets locked up like this, I can still do anything in the VBE (edits cells, run macros, etc.) with no problems. If I'm in the excel window, I can click alt on the keyboard and the shortcut keys for the menu come up, but I can't go deeper than that by clicking the letter shortcuts, they do nothing. If I use the delete key to delete the contents of a cell, then it gets deleted. But if I type anything else (numbers, letters, or symbols) then it types 2 instances of the key every time, yet when I hit enter, nothing changes in the cell. I also can't really bring focus to the excel window if something else (ie. the VBE) is on top of it, clicking into the excel window just gives the little system 'ding' sound and nothing happens.

If I hit the save button in the VBE (since I can't click anything in the excel window), then it seems to snap out of it and go back to normal. I tried searching for anything simmilar to this and can't find anything...

Any help would be much appreciated. This is driving me nuts!