Results 1 to 15 of 15

Thread: Excel? URGENT!

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2000
    Location
    Ottawa
    Posts
    49

    Question

    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...

  2. #2
    Lively Member
    Join Date
    Feb 2001
    Location
    Qc, Canada
    Posts
    70

    Cool

    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

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2000
    Location
    Ottawa
    Posts
    49

    Question

    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...

  4. #4

    Thread Starter
    Member
    Join Date
    Dec 2000
    Location
    Ottawa
    Posts
    49

    PLEASE ANYONE!

    PLEASE ANYONE!
    hmmm... Me thinks me go home now... I've been working to hard...

  5. #5
    Lively Member
    Join Date
    Feb 2001
    Location
    Qc, Canada
    Posts
    70

    Lightbulb

    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

  6. #6
    Lively Member
    Join Date
    Aug 2000
    Location
    Darlington, United Kingdom
    Posts
    121
    Dmack,

    Are the cells that you are trying to protect formulated cells or do they contain sensative information...??
    Do Not Underestimate The Power Of Simple VBA

    Maybe Its Just Not Possible, But Then Again What Is Impossible

  7. #7
    Lively Member
    Join Date
    Aug 2000
    Location
    Dullawhere
    Posts
    100

    Lightbulb

    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 !"

  8. #8

    Thread Starter
    Member
    Join Date
    Dec 2000
    Location
    Ottawa
    Posts
    49

    Unhappy

    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...

  9. #9
    Addicted Member atif's Avatar
    Join Date
    Jan 2001
    Location
    New Jersey, USA
    Posts
    149
    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++

  10. #10
    Addicted Member atif's Avatar
    Join Date
    Jan 2001
    Location
    New Jersey, USA
    Posts
    149

    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++

  11. #11

    Thread Starter
    Member
    Join Date
    Dec 2000
    Location
    Ottawa
    Posts
    49

    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...

  12. #12
    Addicted Member jestes's Avatar
    Join Date
    Jan 2001
    Location
    Dallas
    Posts
    248

    use this in your load script

    mnuEditPaste.Enabled = False

  13. #13
    Addicted Member atif's Avatar
    Join Date
    Jan 2001
    Location
    New Jersey, USA
    Posts
    149

    Smile

    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++

  14. #14

    Thread Starter
    Member
    Join Date
    Dec 2000
    Location
    Ottawa
    Posts
    49

    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...

  15. #15

    Thread Starter
    Member
    Join Date
    Dec 2000
    Location
    Ottawa
    Posts
    49
    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
  •  



Click Here to Expand Forum to Full Width