+ Reply to Thread
Results 1 to 6 of 6

VBA warning for misplaced workbook

Hybrid View

gsheets VBA warning for misplaced... 04-24-2007, 10:17 PM
Reafidy Cross POst... 04-24-2007, 10:30 PM
Bryan Hessey Thank you for your post. I... 04-24-2007, 10:46 PM
Reafidy Well I guess you have to also... 04-24-2007, 10:59 PM
mudraker gsheets please read forum... 04-24-2007, 11:22 PM
royUK This would be unnecessary if... 04-25-2007, 02:21 AM
  1. #1
    Registered User
    Join Date
    10-02-2006
    Posts
    24

    VBA warning for misplaced workbook

    I have one excel workbook (called “workbookA”) stored on network device (hard drive with its own ip address). The idea is not to allow users to save that excel workbook locally on individual pcs; otherwise, others wont be able to see updates done by a particular user that saved the workbook on his or her computer (regardless of intention).
    The idea I have is to have a second workbook (called “workbookB”) on the same network drive; and cell $A$1 of this workbookB is being referenced by workbookA.

    $A$1 cell of workbookB has value of ‘20’. And, cell A8 of workbookA refers to that cell

    My code below checks the value of A8 cell of workbookA against the value of $A$1 cell of workbookB has value of ‘20’. If the values do not match, cell A9 of workbookA displays “Unauthorized Copy”


    Code:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Range("$A$8") <> "'[NO_NO.xls]SHEET00'!$A$1" Then
    ' places "Unauthorized Copy" to Cell $A$9
    Application.EnableEvents = False
    Application.ScreenUpdating = False
    Sheets("FID").Unprotect Password:="password"
    Range("'[FID.xls]FID'!$A$9").Value = "UNAUTHORIZED COPY"
    Sheets("FID").Protect Password:="password"
    Application.EnableEvents = True
    Application.ScreenUpdating = True
    End If
    End Sub

    I feel embarrassed, but this is the best idea I’ve got. Plus I am getting "Run-time error '1004'; Method 'Range' of object '_Worksheet' failed" & whenever the workbook is being opened, excel asks is the links (referenced) are to be updated or not (whole another story). Are there any simpler & more interesting ideas to ensure that the user gets alerted whenever the workbookA is removed from the network device?

  2. #2
    Forum Contributor
    Join Date
    12-12-2006
    Location
    New Zealand
    Posts
    151
    Cross POst

  3. #3
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Thank you for your post.

    I wonder whether more time and resources are spent by OP's double posting, or by police-type-persons reporting-complaining-noting-locking-banning these items.

    ---
    Si fractum non sit, noli id reficere.

  4. #4
    Forum Contributor
    Join Date
    12-12-2006
    Location
    New Zealand
    Posts
    151
    Well I guess you have to also factor in the time wasted by helpful people trying to figure out an answer when the question has already been solved somewhere else.

    I dont consider myself a policemen nor envy the painful job of the moderators, I do however appreciate being warned of a cross post, so i do the same when i can in return.

  5. #5
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    gsheets

    please read forum rules - see links below

    closing thread
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Quote Originally Posted by Bryan Hessey
    Thank you for your post.

    I wonder whether more time and resources are spent by OP's double posting, or by police-type-persons reporting-complaining-noting-locking-banning these items.

    ---
    This would be unnecessary if people took the time to read Forum Rules and followed what amounts to simple courtesy to avoid free help being wasted on solved questions.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1