Save Contents Of Clipboard

Mar 29, 2007

I have a spreadsheet where i need to disable Cut but allow copy & paste. This must stop dragging and dropping and only apply to the workbook in question, i.e. if I CTRL-TAB to another workbook cut is re-enabled. I have used the following code

Private Sub Workbook_Activate()
enableCut enable:=False
End Sub

Private Sub Workbook_Deactivate()
enableCut enable:=True
End Sub

Public Sub enableCut(enable As Boolean)
Dim cBar As CommandBar
Dim cbCtrl As Office.CommandBarControl
With Application
If enable Then
.OnKey "^x"
.OnKey "+{DEL}"...................

View 2 Replies


Save Clipboard Content Or Not?

Nov 15, 2011

I have the following challenge: In VBA I copy from a file (and the copied area goes on the clipboard). The clipboard contents is then copied into another workbook and worksheet. Closing the file (close workbook) from where I have copied, I get the question: "do you want to save the clipboard contents, etc., etc, " ending with the buttons YES or NO to be pushed. How can I disable this question in VBA.

View 3 Replies View Related

How To Clear Contents Of Clipboard Before Tool Takes Screen Print In Excel VBA

Apr 20, 2014

I've have a tool/code that takes the screen prints of the active window (when I press F9) and pastes it in a word document.

But whenever I do copy some text or any other image and when I press F9 to take the screen print of the active window. I get the text pasted into the word, this is because the clipboard content has text first and then the screen print of the active window.

Instead When I press F9, I wanted the below to happen

1. Content from the Clipboard should be cleared

2. Take the screen print

3. Paste it in the word document.

Note: My tool/code already does 2 and 3. Looking for 1 alone, ,

View 4 Replies View Related

Copy Userform To Clipboard And Save As JPEG

Nov 24, 2009

I am on the final part of a visitor log and I am stumpped on how to finish it. I have a electronic signature pad (Interlink Electronics-ePad) that the controls will not allow me to use in VBA for excel, I can get the image and signature on my usersform but am unable to save just the image through any code.

All I have been able to come up with at this time is saving the userform and pasting it in the active worksheet (code for this I found here written by "Michel Pierron"). What I would like to be able to do is have the userform image cropped to where the "Image1" image is (Signature will be in it place when done, the OCX esign block will not show on upload) and then saved as "visitors name, date/time.JPEG" to a folder in my documents.

The attached file is a stripped down version of what i have so far with no checking involved, just trying to get the save part of this done. If all I can do is save the userform as a whole that would work also but would like to be able to change it to a jpeg for storage. Have tried to use epads SDK's to achieve a saved signature but haven't been able, was suppose to be on vacation this week but need to get this done before the 1st.

View 5 Replies View Related

Save AS File Name As Cell Contents

Oct 6, 2009

I would like to be able to open a template and save the contents of cell B19 as the file name.

Can I do this so i don't have to press a button to run the macro. I have only done one macro previously and that was with the help of people on this forum so don't get to technical.

If possible I would like to be able to save it on the server X:
eportsoffender PDF's

View 10 Replies View Related

Copy Cell Contents To Different Worksheet On Save

Oct 28, 2008

I have an Excel invoice set up and working well. It does a bunch of things with macros - e.g. on save it increments the invoice number well as creates a jpeg screenshot for the invoice archives. I have added an additional worksheet (titled 'VAT') to the workbook. The new 'VAT' worksheet has five simple columns; Invoice no, Subtotal, VAT, M.O.T. and Total.

What I need:-
On saving the workbook I would like to add a macro function that copys the final contents of the Invoice no (H2), Subtotal (C37), VAT (C38), M.O.T. (F38) and Total (I38) cells from the 'Sales Invoice' worksheet to the newly created 'VAT' worksheet in the respective columns. I would like this to be cumulative, i.e. continue to add the contents of the afore mentioned cells to the appropriate columns in the 'VAT' worksheet every time the invoice is saved. I would also like to have the Subtotal, VAT, MOT and Total columns summed and outputted in a cell of their own - but hopefully I can handle that.

View 2 Replies View Related

How To Set SAVE AS File Name To Equal A1 Contents When Rename File

Oct 19, 2005

How can I set the SAVE AS file name to equal A1's cell contents? (More specifically, when I need to rename an existing open file and place my cursor in A1 and hit Save As, I need to new file name to automatically populate A1's cell contents so I don't have to retype the contents of A1.)

View 1 Replies View Related

Clipboard Value

Mar 27, 2008

Can i put the value or range of the clipboard in a variable?

I have a macro that put the cutcopymode at false but i want to put the clipboard in a variable before putting the cutcopymode at false.

View 9 Replies View Related

Clear The Clipboard

Nov 20, 2008

I'm trying to clear the clicpboard using VBA so i don't get messages asking me what to do. is this possible and if so how? i could simply turn all alerts off but i rather not.

View 3 Replies View Related

Clipboard Clearing

Jul 3, 2009

I am running into trouble with too much data accumulating on the clipboard in XL2007, so is there any way to set cutcopymode=false (or some other function) so that the clipboard is automatically cleared after every paste event throuout a macro project without having to restate cutcopymode=false after every paste?

View 7 Replies View Related

Clipboard Manipulation

Oct 6, 2007

I am looping through and copying screens of mainframe data and appending them to the clipboard. Once done, I start a Notepad and paste it for future massaging. Now I need to perform a check on each screen which requires copying something from the screen, assigning to a variable, and checking it. This overwrites what I've already stored on the clipboard. Is there a way to store what I've got on the clipboard, then use the clipboard for something else, and then reload the clipboard?

View 3 Replies View Related

Clear Clipboard

Oct 7, 2007

I'm currently opening up worksheets, copying the data there inside tables and pasting it over to a new worksheet which is basically the summary of all the data, unfortunately because I am moving large amounts of data, half way through the process I get a pop up asking me if I want to copy data to wherever to make sure it's stored or do I want to loose it, of course it's only a matter of hitting the no button to re-write the data so copy and paste carries on working but is there no function in VBA to clear the clipboard after every copy and paste, such as clipboard.clear, or something along those lines? Anything that will stop this message from appearing, I was my summary worksheet to work without popups appearing because then that would mean someone would have to sit there as it copies and pastes values, clicking no every time the clipboard gets full.

View 3 Replies View Related

Compare Cell Contents With Given Range Of Contents

Dec 30, 2013

I have attached a workbook stating my problem.


View 10 Replies View Related

Combine Contents Of Two Cells Depending On Contents Of Another?

Jan 14, 2013

I am trying to combine the contents of two cells depending on the contents of another, I have tried to use the If function but am coming up stuck!

I have provided a link to the example file below:


View 4 Replies View Related

Turning Off The Clipboard Sound

Dec 12, 2007

I recently installed Office 2002 onto a new computer and found that whenever I drag-and-drop any amount of data from one cell to another, a loud obnoxious noise plays when I release the drag-and-drop data.

I was using the same version of Office on my old computer and did not have this problem.

I'm guessing it's a clipboard issue, since when I open the Excel clipboard (where I currently have all options as unchecked) and copy something so it is captured there, the same noise plays.

I already have turned off Windows sounds via the Control Panel and have no clue how to turn off this sound.

View 12 Replies View Related

Copy Is Not Working From Clipboard

Jul 16, 2014

Iam trying to copy the web page contents into a word document, but i m recieving a below message @ line

"oIE.document.body.createTextRange.execCommand ("Copy")"

Object Doesn't support this property or method

View 7 Replies View Related

Send Output In Clipboard?

Feb 26, 2014

I have below vba code which output result in wordpad file. I want to send output in clipboard instead of wordpad file.

[Code] .....

View 2 Replies View Related

Paste Clipboard On VbOKOnly

Mar 3, 2009

I need a snipit of code that will paste the clipboard when the OK button on a message box (vbOkOnly) is pushed. I have in the past was able to make it stop if "Cancel" was selected, but one button seems to be harder for me.

View 2 Replies View Related

Formula's Value Written To ClipBoard

Oct 4, 2009

I have a formula that will give me a phrase that I need to be able to paste into other applications - the value and not the "mid"s and the "search"s, etc. So, can anyone tell me how to take that formula's value and write it to the clipboard?

View 3 Replies View Related

Stop VB From Clearing Clipboard

Apr 6, 2010

I have a file with Workbook Activate/Deactivate and Worksheet Activate/Deactivate commands in it. When someone is trying to copy information from or to this workbook the VB automatically clears the clipboard (or at least that's how I understand it), which makes it so they can't paste that data anywhere else. How can I prevent this, but still keep my current commands?

View 9 Replies View Related

Can't Copy Items In Clipboard

Nov 1, 2011

I can't copy any item into clipboard

View 4 Replies View Related

Inserting Row With Stuff On Clipboard?

Dec 14, 2011

Sometimes I need to copy something to the clipboard, then go to another sheet (or somewhere). When I get "there", I sometimes want to insert rows, without "inserting cut/copied cells" . . . . So I end up saving the worksheet to clear the clipboard, then inserting my rows.

Can I insert blank rows while maintaining my clipboard?

View 3 Replies View Related

Copy Paste Without Clipboard Using Last Row

Feb 21, 2012

I am using the following code in a template I have created for my department. I am copying a formula from the 7th row of the specified columns and want to copy and paste the row down to the "last row" which I have specified from an input box. I am trying to do this without using the clipboard, because some files are 50,000 lines or more and I want to speed this process up.

In the code where I have say Sheet4.Range("A8:I140000") I would like to use last row somehow like Sheet4.Range("A8:Lastrow")

View 8 Replies View Related

Count Rows In The Clipboard?

Feb 6, 2014

I am copying information from a data extraction application called Monarch and then pasting it into Excel. The data to be pasted has to be inserted in between some existing data in the worksheet. Is there a way to count the number of rows in the clipboard so I can insert this number of rows into my worksheet then paste the data from the clipboard?

View 2 Replies View Related

Reading From Clipboard Before Pasting

May 28, 2008

Is it possible for VBA to read data from a clipboard so that it knows what sheet to paste the data to? Currently we run a financial tool and 2 reports are ran and I put in a bottom so users could easily just paste special values into the correct place. Sometimes the users forget if they copied the balance sheet data or income statement data and currently its not a big deal because there are no columns to the right of where it is pasting so it isn't screwing anything up and they just delete the data and paste it to the correct sheet.

I have thought of 2 approaches I am going to take, but started to wonder if one could read the data from the clipboard before the paste.

My 2 options would be:

Option 1. Paste data to newly created sheet and check if it is balance sheet or income statement and then move from newly created sheet to correct sheet and delete newly created sheet. The user wouldn't see any of this because I would disable screen updating.

Option 2. Learn how to use Undo within my VBA or keep the Undo cache with items in it as it typically clears when VBA is executed. That way if they paste it and it is wrong I can just undo the VBA paste.

Option 1 I am confident I can handle. Option 2 I can research and feel I could do, but if it comes a time when a sheet has data I do not want to paste over then this option is no good.

I would like to hear any comments or feedback on this and if it is possible to read data off the clipboard so it knows where to paste.

View 9 Replies View Related

Clearing The Clipboard In Code

Jul 17, 2007

My workbook has much copy and past from one sheet to another after a web query, eventually it freezes.

I suspected all along it had something to do with the Copy/Paste and the clipboard required to be absoultely emptied.
The code I used to "clear the clipboard" is:

Declare Function CloseClipboard Lib "user32" () As Long
Declare Function EmptyClipboard Lib "user32" () As Long
Declare Function OpenClipboard Lib "user32" (ByVal Hwnd As Long) As Long

Sub ClearClipboard()
OpenClipboard 0&
End Sub

But when I checked out some freeware in relation to clipboard viewers etc, it seems after running this code it does not absolutely empty the clipboard.

How can I empty the clipboard entirely or am I not constructing my work correctly ?

View 9 Replies View Related

Insert Value On Clipboard Into Find Method

Jan 31, 2013

How to get the GetFromClipboard syntax from here working with my code (below), but am having a really frustrating time. Basically, I need to search for whatever value is copied to the clipboard (as you can see below which will be relative to a certain cell).

Here's what I have so far, and I'm trying to replace the contents of the What:="121212121" part of the Find method to look for the clipboard contents (a 9 char number) in another sheet (where a duplicate exists - the value I am searching will be a unique identifier for the incorrectly created duplicate record that needs to be deleted).

So, What:=<insert number/string on clipboard here>

Sub DeleteDupes()

ActiveCell.Offset(0, 5).Range("A1").Select
Cells.Find(What:="121212121", After:=ActiveCell, LookIn:=xlFormulas, _

[Code] .....

View 2 Replies View Related

Excel Reversing Day And Month In Clipboard

Nov 21, 2013

My colleague copies a date to the clipboard and then pastes it back onto the same spreadsheet. The month and day reverse (01/12/2013 becomes 12/01/2013). This doesn't happen when copying 14/12/2013 (probably because it can't be interpreted two ways) nor when avoiding the clipboard with ctrl-C/ctrl-V.

My working theory is that it's some kind of autotext or formatting function. Is there a way to disable this feature/function/glitch?

View 1 Replies View Related

Macro For Pasting CSV Data From Clipboard?

Jul 17, 2014

I'm trying to implement a very simple macro to paste a set of cells - already copied to the clipboard from a CSV file - into a worksheet.

Basically, all I need it to do is to allow the user to open that other CSV file, hit CTRL+A and CTRL+C, then go to the relevant sheet in my workbook and run the macro, which should simply paste the copied data into that sheet (starting at cell A30).

Here's what I have so far - I keep getting an error when the macro reaches the ActiveSheet.Paste command.

Sub UpdateData()
' UpdateData Macro
Dim strSheetName As String


View 5 Replies View Related

Paste Macro - Clipboard Validation

May 5, 2009

If the user clicks the button to do the paste special macro twice - the second time they get an error (I am assuming that the clipboard has been wiped clean and they need to go back and copy the data again). The specific error message is: "Run-time error '1004': PasteSpecial method of Range class failed".

What I would like to do is add code to the pastespecial macro that looks to see if there is something to paste - if not, I want to give my own message and not the default one.

View 5 Replies View Related

Copyrights 2005-15, All rights reserved