Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Excel


Save Contents Of Clipboard

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 Complete Thread with Replies

Sponsored Links:

Related Forum Messages:
Copy Userform To Clipboard And Save As JPEG
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 Replies!   View Related
Save AS File Name As Cell Contents
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 Replies!   View Related
Copy Cell Contents To Different Worksheet On Save
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 Replies!   View Related
Clipboard Value
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 Replies!   View Related
Clipboard Clearing
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 Replies!   View Related
Clear The Clipboard
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 Replies!   View Related
Clear Clipboard
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 Replies!   View Related
Clipboard Manipulation
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 Replies!   View Related
Reading From Clipboard Before Pasting
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 Replies!   View Related
Turning Off The Clipboard Sound
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 Replies!   View Related
Clearing The Clipboard In Code
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 Replies!   View Related
Paste Clipboard On VbOKOnly
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 Replies!   View Related
Formula's Value Written To ClipBoard
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 Replies!   View Related
Cannot Empty/clear The Clipboard Error
I am using VBA in conjunction with an application called Quick Keys (basically software that allows you to program key strokes) ... and with this current project of mine ... I keep getting one of the following two errors:

"Cannot empty the clipboard" OR "Cannot clear the clipboard"

So I Googled, and based on the results it seems it is a VBA related error!

View Replies!   View Related
Paste Macro - Clipboard Validation
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 Replies!   View Related
Copy The Text From Variable To Clipboard
There is an text string and I need to copy it to Windows clipboard to have a chance to use it later anywhere by Ctrl+V.

Simple, isn't true? But how to do it?

View Replies!   View Related
Copy/Cut Clipboard Being Cleared By Events
I have a legacy Excel VB application with multiple sheets. When the
users tab from sheetA to sheetB the paste buffer is cleared. This might
be due to the fact that sheetB has Worksheet_Activate processing that
does some validation and refreshes a pivot table (on sheetB).

Is there a way to reserve and restore the contents of the paste buffer,
and make sure the user can actually paste values from sheetA to sheetB
(using either Ctrl-V or Edit-Paste)?

View Replies!   View Related
Getting Address Of Range Copied To Clipboard?
get the address of the last range copied to the clipboard? I tinkered with GetFromClipboard but I would like to find a solution that is not dependent upon DataObjects if possible. Since copied cells are "marqueed" in Excel, is there a property relating to marqueed cells address?

View Replies!   View Related
Worksheet Refresh Clears Clipboard
I have written a spreadsheet for scheduling employee shifts.

My problem is that I have written some calculations in on the Worksheet_Change subroutine.

What happens is when I want to copy a selection and paste it multiple times, it clears my active selection's "Copied" status whenever I paste.

I'm not sure if I'm explaining it clearly, but if I copy a selection (it turns the typical selected colors with the dashed border), go to the first destination, and paste, the spreadsheet then refreshes the total hours columns, which clears the "copied" status of the original range.

I was thinking of checking the clipboard contents to see if it contains an excel range, and putting it back in the clipboard after the spreadsheet updates.

I'd like to know how to check the clipboard contents, or if anyone else can think of a different way to circumvent this,

View Replies!   View Related
Close Workbook Without Clipboard Message
When processing workbooks via VBA, on closing the workbook I sometimes get a request to respond to whether I want to save the clipboard. In the same way that there is the option to open a workbook without refreshing links: updatelinks:=False

I assume there is something on the order of: workbook.close DontSaveClipboard:=True

Question #1 is: What is the parameter syntax for saving or not saving the clipboard?

Question #2 is: Where would I go to look up these parameter settings instead of having to come back to the group every time I find the next one I need?

View Replies!   View Related
Copy Status Bar Stat To Clipboard
I want to create a macro that will copy the stat that is displayed in the status bar (bottom right corner - e.g. Sum, Count, Max, Min, etc.) into the clipboard in order to paste it to another workbook or worksheet. At present, I'm creating a formula on the active sheet and pasting the value to the detination sheet/workbook. Since I have to do this many times over, I'd prefer to have a macro to copy the value in the status bar to the clipboard, and simply pasting.

View Replies!   View Related
Stop Data On Clipboard Message
I've just written a macro to copy large amount of data from one worksheet into another. It works well right now, except a little problem. Every time I run the macro, there is always a message box appeared. It let me to choose whether to save or delete data on the clipboard. And I usually choose 'no'. (The message box has been screenshotted and attached into this thread.) Because I use this macro very often, it really makes troubles to me. Is there anyway to block the message box. I mean let it never appear?

View Replies!   View Related
Copy A Cell To Clipboard With Single Click
I do lots of web form fill up from excel spreadsheets to a web form.

To copy a cell what I can do is,
select a cell

What I need is when I select a cell, ctrl+c will be triggered auto. So no need for pressing ctrl+c to copy a cell to clipboard.

How can I do it?

View Replies!   View Related
Prevent Loss Of Copied Data On Clipboard
Using a macro I want to paste from the clip board.
I can manually do this by opening the clipboard, selecting the data, which pastes to my specified location.

The macro copies to the clipboard okay, but loses the data that I want to paste because just before pasting I have to clear data which was previously been filtered - I have to do this at this point. The macro bogs down. If I end the macro there, I can manually open the clip board and choose the data I copied from there and paste it that way. I'd like the macro to do this for me.

View Replies!   View Related
VBA To Copy Selected Cells To Clipboard With Text Data
Need aid in copying certain cells with text/labels to clipboard to format a body of email to be sent via Yahoo webmail, so I can paste it where needed.

I did a couple of Excel VBA's back in 2000 or so at last job but haven't seen/used VBA since.

Have a spreadsheet with customer data, (one cust per row) and wish to create something like the following in clipboard (in this example, assuming row 2 is the selected row)...I'll only be sending out one or two of these per day so nothing fancy is needed, just a way to avoid retyping critical data that could get mistyped.


Rental details for 2008

Customer Name : A2
Unit nbr : A3
Nbr of weeks : A4
Balance due : A5

I'm using Office 2000 still...I've done some searching but results found seem to complicated for my situation or not quite close enough for me to see how to apply it.

View Replies!   View Related
A Macro To Paste The Most Recent Entry From The Office Clipboard
I'm doing a data/filter/advanced filter/show all/unique records to get rid of any duplicate rows. I tried creating a macro and but the macro recorder doesn't know that I want to do NOT a regular paste, but a paste from the most recent entry from the Office Clipboard. Is there a formula and/or macro that will allow me to do this?

View Replies!   View Related
Stop Large Amount Of Data On Clipboard Message
I have some code to open up another workbook, take the data from sheet1 in it, copy it to a sheet in the first book, and then close the opened workbook. My problem is that whenever it closes the workbook it gives me the large amount of data on clipboard window that I must then click 'No' on before it will proceed. I thought that making CutCopyMode = False would fix that, but it hasnt worked. Heres the bit of code that does this:

CutCopyMode = False
Workbooks.Open Filename:= _
Windows("Inventory Report.xls").Activate
CutCopyMode = False

View Replies!   View Related
Macro Close Workbooks - Large Amount Of Data On Clipboard Msg
I am using the close.workbook command in VBA to close a workbook I opened to copy data from. I am getting a message that says "You have a large amount of data on the clipboard. Do you want it available?" What command do I use in VBA say no to this message?

View Replies!   View Related
Customize Look In/Save In (My Places) In Open/Save As Dialog Boxes
I would like to add some icons on the left side of excel open file pane to faciliate my work. Because i need to load some files under the same folder many times a day. Does anybody know how to do that? I've seen people has more icons on the pane before. The defaut setting has only 'History', 'My Documents', 'Favorites', 'Desktop' and ' My nutwork places' on it.

View Replies!   View Related
Code, That Disables Save, Save As And Close Commands
Each of the worksheets in my model use A1 as a control cell for any errors and inconsistencies. My aim is to disable save and close commands in case A1 is not equal to 0 in any of the worksheets.

The code I currently use for that purpose is as follows.

View Replies!   View Related
Save As Macro :: Save File To Folder
I have a macro that copy one sheet of the Active workbook and sends it via email.

I need to add a code in this sheet so when one opens it from the email, with a command button to be able to save the file to specific, fixed folder on the local network with itís original file name.

View Replies!   View Related
Save Workbook Using Variable For Save As And For A New Folder Name
I have figured out how to save the workbook using a variable to saveas but I would like to create a new folder to place the new workbook into. I have tried a few things a am not having any luck. I recorded a macro and the code it produced is as follows.

View Replies!   View Related
Save Back Up Copy Online At Each Save
I have a sheet which I would like to back up online every time it is saved.

I have a sub, OnlineFile(), which I have used many times without any problems, which creates a .BAT file to use ftp to upload files onto our server. As arguments, it takes the local file path that you want to upload (or download to), the name of the file as you would like it stored, the online file path, and whether you want to upload the file onto the server, or download it off the server.

It should be very easy to combine the two: what I tried was:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, cancel As Boolean)
ThisWorkbook.SaveCopyAs ThisWorkbook.Path & "" & "Rubbish.xls"
Call OnlineFile(ThisWorkbook.Path & "" & "Rubbish.xls", "Rubbish.xls", "wwwrootexcelfilesMasters", "Upload")
Kill ThisWorkbook.Path & "" & "Rubbish.xls"
End Sub

Every time I ran this, the file got uploaded correctly, but Excel had a series of problems. Often the code ran fine the first time it was run, but crashed the second time round.

After a fair bit of troubleshooting, I found that the problem came about when the file was trying to save itself - i.e. after the end of the sub. If you pause any macros from running, it still saved fine, but when the code ran, it found errors, froze or closed excel.

My thought at this point was that the code was fragmented or something. I made a new sheet, and retyped just the relevant bits of code (i.e. the BeforeSave sub, the OnlineFile sub and created the form called by OnlineFile). The problem persisted.

I've come up with a workaround for this now (which uses the same OnlineFile sub & form, and works fine), but it's driving me crazy - why does this cause excel to die? Particularly on the second time through? The code seems far too simple to cause such problems - is there a bug in Excel perhaps (I'm using Excel 2000 on Windows XP).

View Replies!   View Related
Find Cell, Copy Adjacent Cell Or Cells To Clipboard
Hereís what I want to do in VBA

1. Put a value in cell H1 (text and numbers)

2. Find a matching value in column A (starting in row 2), error message if the is not a match.

3. Copy the adjacent cell column B (rows vary) to the clip board. It would copy until it found the first blank row.

I have attached a scaled down version of the spreadsheet, the one I use has 100's of codes. I know some VBA but not much. I searched the forum but could not find anything.

View Replies!   View Related
Get/Convert Number From Clipboard As/To True Number, Not Text
Does clipboard method gettext retreive the text from clipboard only, not number? What if numbers are copied (Ctrl C) to clipboard?

View Replies!   View Related
Disable Save & Save As Buttons
I use to send reports to my seniors on daily basis.
I want these reports to be with me and they can just open and check the reports, when I send them. If they try to save file through File-Save or File-Save As, they should not get these options at all in the File Menu.

View Replies!   View Related
Save Button Save The Workbook
I have a update/Save button on a spreadsheet. So when clicked it updates another sheet and saves the workbook.
how can i have it run the macro when they don't click the button and do
File -> Save.

View Replies!   View Related
Overwrite The Save/save As Feature
i have a master workbook. it gets used daily as a template and saved as another file name. the file name is generated by 5 cells that each contain different data (date, street, town, state). is it possible when i hit the save or save as button/icon, for a file name to be automatically generated from the cells i have data in??

PostPosted: Wed Oct 15, 2003 5:12 pm Post subject: Re: change default saveas name for new file w/o saving
Okay, so you want to create a workbook via code, prompt the user for a SaveAs name, then save this workbook?

Sub CreateAndSave()
Dim wb As Workbook
Dim SaveFileName As Variant

Set wb = Workbooks.Add

ChDrive "C"
ChDir "C:VBA Code"

SaveFileName = Application.GetSaveAsFilename("It is a new file.xls", _
"Microsoft Excel Workbook (*.xls),*.xls")

On Error Resume Next
If SaveFileName False Then wb.SaveAs FileName:=SaveFileName........................

View Replies!   View Related
- Disable Save As And Define The Save Name
I have a file that I have created that the users will use as a master template to create data that I need. Once they have finished, I want the file to define what the filename should be when they click save.

At the same time, I want to disable "Save As..." as some users will just use that and then will use a file name that another macro (that I will use) won't recognise.

View Replies!   View Related
Save, Save As- And Reset Button
I have a spreadsheet with 32 worksheet, I want to write a macro to "save the work, save as.. in a specific location and with a specific name and then reseting all data in specific cells.

View Replies!   View Related
Macro To Save, Save As With Sequential Name
My spreadsheet has 32 worksheets, I've recorded a macro to do the job "save, save as with specific name", but what I want is, when save as, I wanted the file name increase in one number, and the date in a specific range "H8:J8" the date should be the next saturday.

here is part of the code.

ActiveWindow.SmallScroll Down:=-12

on this example I want the file saved as "PrA4W05.xls", being the next week "PrA4W06.xls", and so on.
and on "H8:J8" the next saturday.

View Replies!   View Related
Choose Sheets That Save Or Don't Save
I have 120 sheets in my workbook and I only need 5 of them to save when there are changes, the other 115 are were data is pulled from. Is it possible to tell excel not to look at a sheet when it saves? I'm just after making it save faster.
This is going to be a workbook that " moves" a round a lot, so I want to the 115 sheets in the same workbook.

View Replies!   View Related
Having Cells Change Their Contents According To What The Contents Of Other Cells Are
I have a column in my .XLS whose contents I want to change depending on what the contents of the cells of a different column are. However, I only want two cells from the same row to be dependent on each other. So, for example, if $A$1 reads "1" then $B$1 should read "apple" and if $A$2 reads "1" then $B$2 should read "apple"; if $A$12 reads "3" then $B$12 should read "pavement" etc.

View Replies!   View Related
Capture "Save As" Pathname And Save Another File
I have an excel workbook that uses a .bmp file [a picture]. The master excel file and the .bmp file are in the same directory on the network. The excel file is "Read-Only", so the user would open it, customize it and save it on their own computer or somewhere else on the network.

They are only allowed to save it under "Save As". Once the user saves it, they would then be able to use their customized copy for future updates etc. The problem is that the .bmp file is missing from this new directory.

Is there a way to automatically save a copy of the .bmp file under the Directory specified by the user, so it's always available when the Excel workbook is opened? Or is there a way to attach the .bmp file to the excel file, so they are always saved together?

View Replies!   View Related
Want To Disable Save And Save As
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
a = MsgBox("Save Is Disabled", vbOKOnly)
If a = vbOK Then Cancel = True
End Sub

How do I get out of this file with my changes? Don't laugh.

This what I ended up with:....

View Replies!   View Related
Disable Save / Save As
i tried all vba's here and on google to disable save / save as, but none of them work so i would like to know the other way , how to go with clearing the contents of cell, the moment someone clicks save / save as, with /without range by using beforesave event

View Replies!   View Related
Not Before Save, But After Save Command Possible
I know that there is a command called "Private Sub Workbook_BeforeSave"

but is it possible to execute a routine after some one has saved?

so that each time a user selecteded save it would adn then routine this routine immediately afterwards?

for example:
say the routine was Run "Test" how would you incorporate this line into the command?

View Replies!   View Related
Prevent Save Until Save As Used
I am trying to hide/grey SAVE option from the menu bar and reset menu back to normal after Save AS has been used.

I was able to do disable SAVE using the following code.

Application. CommandBars("worksheet menu bar").Controls("File").Controls(4).Visible = False


the SAVE icon on the Standard toolbar still exist. Is there any way I can disable it and also prevent CTRL. S being used.

Second part of the question.

Once I use Save as I would like menu to be reset back to normal.

View Replies!   View Related
Save As Macro (macro That Opens The Save As Window)
I'm trying to have a macro that opens the save as window, places the name in cell f5 and then allows you to save the workbook with cell f5 as the filename. I have managed to get the save as window to come up and the cell f5 as the name, but when I press save is doesn't. Here is what I have (also, is there a way to direct this to a specific folder).

View Replies!   View Related
Disable The "Save" Option From File Menu And Allow Only To "Save As"
How do I disable the "Save" option from File Menu and allow only to "Save as"?
Excel 97/2000

View Replies!   View Related
Copyright © 2005-08, All rights reserved