Stop Cut/Copy Ability In Workbook

Oct 15, 2007

I wanted to stop users from using cut and paste as well as drag and drop so I found something in Ozgrid to do that. (http://www.ozgrid.com/VBA/disable-cut-copy.htm)

Problem now is I am trying to run a macro that will copy and paste certain values, but because of the code I have added in the above link, whenever I click on a cell and copy it, when I click any other cell, the copy area gets cleared which of course disallows me from pasting it.

Private Sub Worksheet_Activate()
Dim oCtrl As Office.CommandBarControl
With Application
.CopyObjectsWithCells = True

.CellDragAndDrop = True
.CutCopyMode = True 'Clear clipboard
End With

'Enable all Cut menus
For Each oCtrl In Application. CommandBars.FindControls(ID:=21)
oCtrl.Enabled = True
Next oCtrl

'Enable all Copy menus
For Each oCtrl In Application.CommandBars.FindControls(ID:=19)
oCtrl.Enabled = True
Next oCtrl.....................

View 2 Replies


ADVERTISEMENT

Disable User Ability To Close Workbook

Jan 25, 2007

I have a workbook that has a macro that needs to run before it is closed. I have a button on my sheet that runs that macro and then closes the sheet. Is there a way that I can disable the "X" at the top right hand of the workbook and force the user to close the workbook via my button?

View 3 Replies View Related

Stop Hiding Workbook

Aug 9, 2007

How do I stop a user hiding a workbook using VBA? I have tried:

Private Sub workbook_deactivate
If windows(myfilename).visible = False Then
windows(myfilename).visible = True
End If
End If

This works but when I try to close all files sometime I have to press the top cross twice. This may be because one workbook references the rest.

View 2 Replies View Related

Stop The Calculations When The Workbook Opens

Nov 24, 2009

I need to stop the calculations when the workbook opens. I have tried

View 2 Replies View Related

Stop Workbook Functioning After X Days

Mar 18, 2009

I need to know how to make a workbook (and any/all copies made there from) cease to function (become irreversibly read-only) after a specific period of time following the first time it is loaded by a user (this would be preferable), or after a specified date (this could also work).

View 9 Replies View Related

Prevent/Stop Workbook Closing Via Top X

Aug 30, 2006

i am using the following code to close my userform and work book,this disables the exit button on the userform but i can still close the workbook by using the exit buttons on the sheet. can i disable the exit buttons on the sheet so the only way to close the workbook from the userform

Private Sub CmbClose_Click()

Dim ans As Variant
ans = MsgBox("This will close XL, save current file?", vbYesNoCancel)
If ans = vbYes Then 'save book and quit XL
ThisWorkbook.Save
Application.Quit
ElseIf ans = vbNo Then ' no save and quit XL
Application.Quit
ElseIf ans = vbCancel Then 'no save, no close , back to userform1
Exit Sub
End If

End Sub

View 7 Replies View Related

Stop Calculation On Workbook Close

Dec 1, 2006

I have a report whose calculation time I've reduced greatly by turning off automatic calculation and including in the worksheet code directions to only calculate the impacted range. BUT, it still takes a lot of time to calculate on close, when I turn automatic calculation back on. I'm afraid my users will think their machines have crashed. Does anyone know of a way so that on close, the workbook does not calculate, even though Calculation is turned back on to automatic?

Private Sub Workbook_Activate()
With Application
.Calculation = xlManual
.MaxChange = 0.001
.CalculateBeforeSave = False
End With
End Sub

Private Sub Workbook_Deactivate()
With Application
.Calculation = xlAutomatic
.MaxChange = 0.001
End With
End Sub

View 2 Replies View Related

Stop Formula Auditing In 1 Workbook

Feb 15, 2008

I want to stop the formula auditing from working in one workbook without having to change settings in excel, is this possible?

View 3 Replies View Related

Delete Macros In New Workbook OR Stop Them From Executing

Jul 7, 2014

I've got a macro embedded in a sheet (not in a module)..."Private Sub worksheet_activate()".

I have a macro that copies this specific sheet to a new workbook in order for other users to play with.

Problem is, when they select the new copied sheet in the new workbook, it tries to execute the "worksheet_activate" macro.

I've done searches on trying to delete macros but to no avail....

View 2 Replies View Related

Stop Macro: Messageboxes May Only Appear When The Workbook Is Opened

Feb 6, 2007

I´m using this code to create a messagebox±

Private Sub Workbook_Open()
Dim c As Range
For Each c In Range("E2:E126")
If c > -15 And c < 0 Then MsgBox c.Offset(, -3), vbOKOnly + vbInformation, "LET OP! Einddatum contract nadert!"
Next
End Sub

The messageboxes may only appear when the workbook is opened. The problem is that they appear when I change something in the workbook.

View 4 Replies View Related

Stop Links Updating Opening Workbook With Macro

Jul 24, 2007

Currently I am using VBA Code below to Stop Update links prompts

Private Sub Workbook_Open()
Workbooks.Open "C:TempBook2.xls", UpdateLinks:=False
End Sub

Is there code I can use such This Workbook so that I can save this file as another name and it will work? Biz Auto Merged Post;Dear All, I have found VBA code that works.

Private Sub Workbook_Open()
Workbooks.Open ThisWorkbook.Name, UpdateLinks:=False
End Sub

View 3 Replies View Related

Lost The Ability To Cut And Paste ...

Mar 29, 2007

The thread title is the entire email message I got from a customer (thru the help desk). I have sent back asking her the following:

Is this happening in all excel documents you try or only some? Are you getting any sort of error message? Can you send me an Excel document you are having trouble with and tell me the exact actions you take?

While I am waiting for her answers, I thought I would ask here if anybody knew:What would cause this to happen?What sort of things I should look for?What other questions I could ask her?At the moment I do not know if she was in an Excel workbook that had vba code behind it or not. So my questions are for both what could be in vba code and what she could have done (without knowing) to cause this phenomenon

View 7 Replies View Related

Locked Cells With VBA And Ability To Filter

Oct 23, 2008

how to create two buttons so that I can have a data entry specific protection and then a lock all button. Here's the link to the thread:

http://www.excelforum.com/excel-prog...-a-button.html

And here's the code I'm currently using:

View 3 Replies View Related

Stop Highlighting Copy And Saving?

Nov 29, 2012

I have an excel worksheet which I would like to email to people however I want them to be able to view it i.e. so they can see the content of the worksheet but I do not want them to be able to copy and paste, save the file etc. etc. basically all I would like them to do is view it, if they want to copy and paste or actually save it to their computer they must enter a password.

View 3 Replies View Related

Copy Upwards From Last Row - Stop Copying When Run Into New Value?

Apr 2, 2014

I have between 1 & 10 values on column A, which are distributed throughout the column. They are inconveniently at the bottom of the set of data which they are related to.

Solution I'm hoping for:
-Starting from last row that contains a value-
-Copy that cell upwards until it runs into a cell that contains a value-
-Then stop copying that cell, pick up the new value, and then copy the new cell value upwards-
-Stop at A2.

View 4 Replies View Related

Stop Save As And Copy & Move

Apr 2, 2008

I do have an excel file that I do not want to be moved to another location. I was wondering if it is possible to hardcode a location for the file and then check its current location in the drive and if both locations does not match delete its contents.

I tried something like below but I keep getting an obeject required error. I would really appreciate if someone can guide me to the right direction.

Private Sub Workbook_Activate()

Dim location
location = "C:InetpubwwwrootLeadershipJC est.xls"

Dim currentloc
currentloc = ActiveWorkbook.FullName

If location = currentloc Then
MsgBox "Due to security settings of this file you can not save this file."
Else
Sheets("JobCosting"). Range(Selection, A2.SpecialCells(xlLastCell)).Delete
End If
End Sub

View 6 Replies View Related

Priority Queue - Ability To Delete Row / Entry?

Oct 29, 2011

I'm trying to get one more feature added to this priority queue tool that a forum member created. Essentially, this attached spreadsheet is a dynamic task/priority list that will change on the fly. See the original thread here: [URL]

The only missing feature is the ability to delete an entry and have all other entries below it change up a rank.

The attached spreadsheet is the almost completed solution

Example:

Original
-----------
Item D - 1
Item B - 2
Item E - 3
Item A - 4
Item C - 5

Remove item B
-----------
Item D - 1
Item E - 2
Item A - 3
Item C - 4

View 4 Replies View Related

Data Validation With User Formula Ability?

Feb 20, 2012

if it is possible to have data validations on a cell within Excel but allow a user to input a formula? The data validation is a decimal between 0 and 1 and the formula would be a vlookup.

View 4 Replies View Related

Maco That Will Copy Text Down And Then Stop At Specific Row

Apr 7, 2009

What I'd like to do is copy text down in column A but when a cell in column C says something like 'end of data' I'd like the copy to pick up the next row in Column A and copy down until 'end of data' and so on.

Or maybe copy text down in Column A until the text changes in col A.

View 7 Replies View Related

Userform Vlookup With The Ability To Save Or Select Values

Apr 6, 2009

I have very limited VBA skills and I have tried to get a vlookup working on a userform. I need data from a range selected in ComboBox1 to drop into Textbox1. I have tried but it doesn't work.

I also need if possible a button that pushes the result of TextBox1 to a cell and another button that allows the user to edit the TextBox1 value in situ.

View 13 Replies View Related

Validations: Provide The Ability To Format The Fonts In The List

Nov 29, 2005

In MS Excel, I find that when the zoom is dropped to 50% the fonts in the
list become unreadable. Is there anyway that the fonts in the list have the
ability to have their own formats?

View 10 Replies View Related

Consignment Program Spreadsheet Rounding With Minimum And Ability To 0 Out

Jul 26, 2013

I am using a spreadsheet for a consignment sales program. I took over the spreadsheet already in use but want to improve on it.

Here are the important cells:

=(SUM(E2:M2)-SUM(N2:Q2))*1.35 This gives us the tentative order for 2013. First sum is amount sent, second is amount returned. The 1.35 is our built in sales expansion.

=ROUND(T2,0) Rounds the above result

Now I need to have a minimum of 5, so anything for tentative 1-5 would be a 5, and there are some negatives under tentative, need those to read 0. Can I get both of these to happen in the round column of step 2 above?

View 4 Replies View Related

Weekly Chart With Ability To Change Start Date

Jan 8, 2009

I have a simple bike log that lists out each day of the month in rows with a summary row between months. Like this...

January Summary
Jan 1
Jan 2
Jan 3
....
Jan 31
February Summary
Feb 1
Feb 2
Feb 3
....
Feb 28

and so on. Each column has a data field where I enter in miles and distance and so on. I frequently add rows if I do two rides in a day so two rows may start with "January 23rd". I would like to have a chart that shows me my weekly ride summary. But I have some issues:
1. With the field summary I don't know the best way to do a chart that doesn't include the summary (the summary data would throw the chart way off)
2. If I have multiple rides in a day I don't know how to make the week include those days
3. I may want the week to start on Monday and not Sunday. Is it possible to have the user choose and have the chart change automatically?

View 5 Replies View Related

Vba: Viewing A Cells Data Through A Text Box With Ability To Change

Jan 13, 2007

I have a text box. I want it to pull the data from Cell B2 and list it in the text box. The problem is that I want to be able to change the data if the user clieck inside the box and changes it.

View 3 Replies View Related

Show (copy) Data At X Time And Stop Update?

Sep 2, 2012

I have two sheets. In the first sheet, I have cell F4 is 00:00:00 (countdown). G9, G10 and G11 are cells that receive data (decimal numbers) live. In the second sheet, I have three cells linked from shhet1 G9 ='Sheet1'!G9, G10 ='Sheet1'!G10, G11 ='Sheet1'!G11 (which update themselve when data is modified in the first sheet). Now I want to set in sheet 2, (assume) cells B9, B10 and B11 to show me (copy) the values from G9, G10 and G11 from sheet 1 when the countdown was 00:00:05 (5 seconds before Start) and not update again if the data changes in the cell it pulled the data from.

Like G9 ='Sheet1'!G9 at 00:00:05 and stop here, do not update anything. OK?

I can do a part, but the real problem is: I can not make it stop cells to update.Stand frozen, freeze, not move, calm .. however. I do not want to seem pretentious (but my knowledge in excel are limited), the most appropriate would be a formula, not macro or VBA, if possible..

View 9 Replies View Related

Stop Macro: Button To Hit Or Better Just Some Keys To Hit To Stop It Without Using The Ctrl+alt+del Which Closes Everything

Dec 13, 2006

my excel sheet runs through a lot of calculations, opens Flowmaster, a simulations program, passes on data, receivs data and so on. Is there any way to have a user input to stop the whole simulation. During the first tries I had a lot of break point in my debugger. But now I want to have a button to hit or better just some keys to hit to stop it without using the ctrl+alt+del which closes everything.

View 4 Replies View Related

Copy Data From Workbook / Open Existing Workbook - Select Range And Paste

Mar 26, 2012

Copy data from workbook, open existing workbook, select range and paste. But my copied data is lost.

Sub Select_Copy_Paste()
'
'
Windows("ElektroFunctiesDatabase.xlsm").Activate
Sheets("PowerSupply's").Select
Range("A2:I6").Select
Selection.Copy

[Code] .........

' Here i need to do something to paste data into r.address?

View 4 Replies View Related

Copy A Range Of Cells In Another Workbook Opened In A Separate Instance Of Workbook

Feb 11, 2010

I m not able to use the standard Excel Paste Special function when I copied a range of cells in another Excel workbook opened in a separate instance of Excel. Instead, Paste Special thinks that I have copied some non-Excel objects and gave me the Paste As options. This is not the case if I open both workbook within the same instance of Excel. Could you share with us if there is a trick to trigger the normal Paste Special options in such situations (without having to invoke Macro procedures)?

View 2 Replies View Related

SaveAs - Copy Sheet Into New Workbook And Save It In Same Folder As Original Workbook

Jun 17, 2014

I have been trying to edit a code which previously saved a copy in a new workbook to a specific folder/path. (Additionally it copies and clears some figures, but this is working as it should.)

However I would like the copy to be saved at the same location as the original workbook, regardless of the path the original workbook is saved.

I.e if I need to move the workbook containing the code to a new folder/location, when using the macro, the new copy should be stored in the same folder/location as the original one.

For now it is only saving the copy into "My Documents"

Code:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 16-02-2009 by ceng
'

Sheets("Bunker ROB").Select
Sheets("Bunker ROB").Copy
ActiveWorkbook.SaveAs Filename:= _
ActiveWorkbook.Path & Range("D3"), _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False

[Code] ........

View 2 Replies View Related

Making Backup Copy Of Active Workbook While Workbook Is Open

Jun 30, 2014

I run a model in Excel that automatically saves my file every xx iterations. After saving the file I want to make a backup of the file. Tried

[Code] .....

but get a permission denied error message.

I don't want to use .SaveAs as it is a huge file that takes a while to save and SaveAs has a tendency to break links that should not be broken..

View 13 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved