|
-
Feb 15th, 2001, 12:10 PM
#1
Thread Starter
Member
Can you using or not using VB scripting cause people to not be able to cut and paste cells throughout a workbook? We are having serious problems with locked and password protected files suddenly having "#REF" all over the place due to someone cutting and pasting data in... Is there a command or process I can use to kill this Problem???
hmmm... Me thinks me go home now... I've been working to hard...
-
Feb 15th, 2001, 12:23 PM
#2
Lively Member
Bonjour in Ottawa !
One quick way would be to protect your worksheet (cells), that would prevent people from pasting stuff where they shouldn't... but then again I don't think this solves your problem ?
Virtually Impossible !
VB5 Entreprise (SP3) - VB6 Entreprise (SP4), MSSQL7, MSAccess, VBA, VBScript, ASP
-
Feb 15th, 2001, 12:29 PM
#3
Thread Starter
Member
Nope it does not solve the problem... Nice try though... That was what I did to solve the other problems... I even wrote a VB script that locks or unlock specific areas depending on who is using the workbook... But they cut and paste data to another area and My Trends sheets go all "#REF" crazy on me... I thought that coding the equation to check certain cells no matter what would help and all that happens is where they pasted turns it's Reference cells to "#REF" instead of where it was cut from and where it was pasted to... Is there a way to add a command to the spreadsheet that
OnRight Click
Give MsgBox "HEY, Don't do that!"
close
So that they don't get the menu?
and then set it do they can not get Cut or copy from they Edit menu????
But, Only in that set of files not all files...?
hmmm... Me thinks me go home now... I've been working to hard...
-
Feb 15th, 2001, 01:26 PM
#4
Thread Starter
Member
hmmm... Me thinks me go home now... I've been working to hard...
-
Feb 15th, 2001, 01:33 PM
#5
Lively Member
You could create an Add-in that would start automaticly with only the sheets you want, that would popup your own menu on the right click of the mouse.
Steph
Virtually Impossible !
VB5 Entreprise (SP3) - VB6 Entreprise (SP4), MSSQL7, MSAccess, VBA, VBScript, ASP
-
Feb 15th, 2001, 04:16 PM
#6
Lively Member
Dmack,
Are the cells that you are trying to protect formulated cells or do they contain sensative information...??
-
Feb 15th, 2001, 04:36 PM
#7
Lively Member
maybe you could do this:
Add in a VBscript that whenever it sees the line of text #REF then it will MSgBox the user and then delete the text ? I am not familiar with excel, so i don't know if you cna do this or not, but it would be something with len in the VB code....
I am stupid..but I AM 15 !
*a line from a song i wrote*
""""""""""""""""""""""""""""""""""""""""
so i came to say life bites away
whats done is done the past is gone
i cant believe the sh*t I know
i always wish it would just go
""""""""""""""""""""""""""""""""""""""""
"remember you Ps And Qs Boy !"
-
Feb 16th, 2001, 07:44 AM
#8
Thread Starter
Member
The cells that are protected are formulas... They are locked... Problem is that when a user cuts then pastes data we end up with missing references... Hence "#REF"... Guess it can't be done...
hmmm... Me thinks me go home now... I've been working to hard...
-
Feb 16th, 2001, 09:04 AM
#9
Addicted Member
It can be done. I'm pretty sure. I deal with this everyday. When you copy and paste it into another excel file, make sure you paste it as "Paste Special" with 'Values' option turned on. It should not give you #REF sign anymore. hope this helps. let me know
Atif AKA AK
VB 5.0
VB 6.0 Professional
VBA, Macros, JAVA, C++
-
Feb 16th, 2001, 10:01 AM
#10
Addicted Member
FOR EXAMPLE
Windows("MyFile.xls").Activate
Range("H:H").Select
Selection.Copy
Windows("MyFile_test.xls").Activate
ActiveWindow.WindowState = xlNormal
Range("H:H").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
hope it helps....
Atif AKA AK
VB 5.0
VB 6.0 Professional
VBA, Macros, JAVA, C++
-
Feb 16th, 2001, 10:17 AM
#11
Thread Starter
Member
Atif...
I know that Paste special works... That's my problem though... I am not the end user of the files and programs I write... The employees in my group are and they tend not to listen and go about cutting and pasting all over the place... Causeing a lot of manual checks on my part to repair the damage...
Can you set it so that paste always enters paste special and does values instead????
hmmm... Me thinks me go home now... I've been working to hard...
-
Feb 16th, 2001, 10:23 AM
#12
Addicted Member
use this in your load script
mnuEditPaste.Enabled = False
-
Feb 16th, 2001, 10:32 AM
#13
Addicted Member
How can they copy and paste themselves when they are using your app. You mean to say, everybody does thier own copy / paste and re not using proper VB GUI screen which does that for them? Because a simple routine can be created and everybody can just run that particular .exe and don't have to worry about it. But oh well. paste it AS special as a default. I'll get back to you for this one....let me check in other words wait!
Atif AKA AK
VB 5.0
VB 6.0 Professional
VBA, Macros, JAVA, C++
-
Feb 16th, 2001, 12:05 PM
#14
Thread Starter
Member
JESTES! YOU RULE!
O.K. that works great for the menu bar.... How can I deactivate it for the right click?
Jestes that is great for the one step..
Last edited by Dmack; Feb 16th, 2001 at 12:11 PM.
hmmm... Me thinks me go home now... I've been working to hard...
-
Feb 16th, 2001, 12:13 PM
#15
Thread Starter
Member
How could I write an add-in that on right click would give them a msg that states this option not active and returns them to the sheet?
hmmm... Me thinks me go home now... I've been working to hard...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|