VBA Warning For Misplaced Workbook ...

May 7, 2007

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”. (One can even elect to have the VBA code to overwrite all cells - thus destroying the workbook.)


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 (saved in a location other then) the network device?

View 9 Replies


ADVERTISEMENT

Security Warning When Workbook Opened

May 30, 2009

my workbook is finally working the way it should but every time i open it i get a security warning window with the options disable macros, enable macros and more info. how do i get this to not show up every time it's opened. this workbook will be used by someone other than me and i don't want them to need to do anything but open it and use it.

View 8 Replies View Related

How To Save Workbook With Macros Without Warning Message

Oct 3, 2013

I have several workbooks that use macros from my personal macro library (MyExcelAddIns.xlam).

Some of these, especially new ones, get an error message every time I save them: "Privacy warning: This document contains macros, ActiveX controls, ... These may contain information that cannot be removed by the Document Inspector."

Then after I save it once or twice, the message goes away. Why am I getting this message? Why only sometimes? What can I do to get rid of it entirely?

View 3 Replies View Related

Gridlines And Axis Ticks Misplaced

Feb 23, 2009

I am doing a scatter plot of several columns and have the x-axis grid lines turned on. What is apparent is that the grid lines and tick marks are slightly off. In my case, when the point value is 6.004 the tick mark and grid line for the value 6 draws through that point.

I am using Office 2003. This was tried in Office 2007 as well with the same result.

View 6 Replies View Related

Excel 2010 :: Comments Misplaced When List Is Filtered

Nov 16, 2013

Please see the screenshot : Excel-comments-misplaced-bug.png

when I filter my list (around 1000 records) and I want to edit a comment, the comments are at their original (unfiltered list's) place. is it solved in 2013 version ? or anyway to solve it ?

View 3 Replies View Related

Off The Warning Message

May 28, 2007

I have a lot of links on my excel page, links going to videos. Everytime I click the link, I have this message :

"there might be viruses... are you sure you want to open this file?"

I know there must be a way to take this message off : I worked with it for months, and then it suddenly disappeared. But now that I formatted, it's back again

View 9 Replies View Related

MsgBox With Warning

Aug 26, 2005

I have several material takeoff sheets and one material SummarySheet in my workbook.

Each material takeoff sheet has a subtotal cell at the bottom of the sheet. The subtotals are added together and the total sum is displayed in a cell on the SummarySheet. At least that is how it is supposed to work. Excel or somebody else arbitrarily changed the cell reference in the SummarySheet formula to call up the cell one row above the subtotal cell on the material takeoff sheets. This little action resulted in a loss of $674,000 and may eventually result in my unemployment. Meanwhile I am sitting here putting out fires.

This is what I would like to do: Place a formula on the SummarySheet or add a Macro that will trigger a warning message box if the total on the SummarySheet is not equal to the sum of the subtotals on the material takeoff sheets. Also would like to have the message box animated or brightly colored.

If(PlateCostsTotals+AppurtenancesCostsTotals+StructuralCostsTotals+MiscellaneousCostsTotalsSummaryCostsTotal MsgBox “Hey, Don’t You Know How to Add”) or an alternate formula that works.

View 9 Replies View Related

Warning Before Closing

Mar 22, 2007

I recently added some code to close a file after a few minutes of inactivity. (Here's the sub code)

Sub time_out()
If Timer - LastEventTime

View 9 Replies View Related

Warning When More Then Two Decimals Are Used

Mar 30, 2007

I am trying to put together a code so that when a user enteres more then two decimal points in the cell value they should get a warning regardless if they formatted the cell to show 2 decimals or not...

Simply the problem is on the sheet I have a lot of people format the cell to show two decimals but when you copy and paste the cell values to other sheets the decimals are still there which causes problems.

I am intermediete in VBA so if someone can shoot me some example codes I think I can make it work on my sheet.

View 9 Replies View Related

E-mail Warning

Aug 14, 2007

I have a plan to create an excel sheet DB of softwares I sold to clients. Each license lasts 1 year. Here's an example of my sheet: ...

View 9 Replies View Related

Crashes Without Warning

Jun 6, 2008

On one laptop Excel crashes, without warning. It happens during copy/paste job (from one workbook to another). But not every time she copies something.

It is completly the same laptop like others in my company. My user has deadlines, and lot of copy/paste job.

View 8 Replies View Related

To Get A Warning Message..

Mar 3, 2009

I have an excel sheet there i am maintaining the details of our sales invoices. Invoice no is in the column D . My concern is while entering a new number in the column D, excel should look at the entire column and give an error message if the no is already exixting in the column.

View 9 Replies View Related

Warning Sometimes Appears

Oct 24, 2007

I have an Excel file that contains macros that I made. Sometimes when I open the file I do not get prompted to enable macros. I DO want to get prompted so I can enable the macros. Any idea why this happens? By the way, my macro security is greyed out so I cannot change it.

View 3 Replies View Related

Warning Of Invalid References?

Jul 28, 2014

Running a worksheet with vba, at the start of the code I turn warnings off and at the very end of the code I turn them back on.When the routines complete a warning is raised:

A formula in this worksheet contains one or more invalid references.

Verify that your formulas contain a valid path, workbook, range name, and cell reference.

When I run Error Checking everything comes up clean.

Clicking on "Show Formulas" shows no formulas for there are no formulas on the sheet to show, just a chart, and clicking "Show Formulas" just turns my dates into serial numbers and screws up the display of the two comboboxes, messing the fonts and drop-down arrows, and since closing and reopening didn't revert the comboboxes back to normal I will now have to blow them away and resurrect them. I also see Show Formulas also messed up my command buttons. nice...

The only way I find to avoid the error is to turn Warnings OFF at the start of the charting routine and NEVER turn it back on.

I made certain that none of my names had any errors in them. Everything looks proper. So what next?

I fear something will create an error for me now along the lines of Murphy's Law

View 2 Replies View Related

Manual Calculation Warning?

Sep 14, 2009

Is there a way to make excel 2007 pop up a warning whenever calculation is set to manual by a macro or any other means? I have on several occasions noticed formulas not working, only to discover that calculation was set to manual without me noticing. And then I don't know how much of my work may have been afffected. This seems like a pretty vital piece of information, and I am surprised that it's not made more obvious.

View 11 Replies View Related

Duplicate Entry Warning?

Jan 29, 2014

I have a userform with a text box which asks for a Tag number which is then linked to a cell. Is it possible to show a warning dialogue box if a duplicate Tag number is entered?

how to set this up on a single cell also would like to see if code can be written for this?

View 14 Replies View Related

Warning Message/box If Cell Over Value

Apr 2, 2009

I have a range of cells and I would like a warning message to pop up if a value over 0.1 is entered. I'm sure it is pretty easy to do, just can't find any info on here and I'm not great with Excel.

View 2 Replies View Related

Delete Sheets Without Warning

Jul 29, 2009

For instance: Sheets(sheets.count).delete. I delete the last sheet, but I dont want a message box warning. Can i disable that with vba code? (offcource I can, but how?)

View 2 Replies View Related

Bypass Save Warning

Sep 17, 2009

my main file goes out and opens another worksheet, modifies it in its existing environment, copies it to a tab on my main file then closes the other file but not save it. Even though I did those things when I was recording the macro, those steps are not coming through.

View 2 Replies View Related

Outlook Email Warning

Oct 12, 2009

I have some code to literally email a workbook to a specific user. But when the email is sending...i am getting the warning form Outlook whethere to send or not. If the user clicks No...then this opens up a can of worms when asking to debug. Is there a way i which i can amend the code to disable this warning and send regardless...without changing security settings in outlook???

View 2 Replies View Related

Warning When Macros Are Disabled

Jun 22, 2007

How can I write a "warning" in the form of a message box that will appear if the user does not enable macros?

Also, can I have one of the buttons on this message box turn on macros?

View 9 Replies View Related

Warning / Alert With Conditions

Jun 1, 2009

I am trying to set up a warning. If an amount is entered in columns u,v, w a warning box to appear telling the clerk to enter a comment in col ab or what I would really like is if they enter an amount the cursor jumps to comments with a command for them to write an explainations.

Do you have a way to do this. (excel 2007)

Col U V W X AB
Held Amount
Write-off AmountTransfer from Proj. to Proj. AmountFinal Invoice
Amount
Comments $ 5.00 $ - $ - $ 273,143.29

View 9 Replies View Related

If TxtOther.Value Is Not In List Warning Msg

Jun 16, 2009

This part of the form is where the user selects the supplier of the fitness equipment via 3 buttons;

CmdLF
CmdTG
CmdOther

Clicking CmdOther checks if there is a text value in other so we have a record of the supplier.
We can't limit this to a definitive list as there may be new suppliers/some in other regions. However, I would like, when user click CmdOther, excel to look up the value they enter into TxtOther.

If it is in a set list, then it goes straight through, if not a MsgBox propmpts the user to check the name and gives them the option to edit the supplier or accept


Private Sub CmdOther_Click()
If TxtOther.Value = "" Then
MsgBox "You must enter a Supplier!"
Exit Sub
Else

[This is where I want it to then check if it is valid before continuing bellow]

ActiveWorkbook.Sheets("DATA").Activate
Range("H2").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell = TxtOther.Value
ActiveWorkbook.Sheets("OPEN").Activate
Unload Me
FrmSubCat.Show
End If
End Sub

View 9 Replies View Related

4.0 Macro Warning On Open

Aug 26, 2008

I keep getting this warning. I temporarily used a 4.0 macro, but found a better way to do it, so I no longer am using that function. How do I remove whatever it is that is calling it so that user's don't have to see this message. There is a small probability that something else somewhere is calling a 4.0 command, but I have no idea how to find out what that is.

I've checked the references, and excel 4.0 Macro's aren't listed, and I'm pretty sure they were before when I was using them.

View 7 Replies View Related

Popup Warning Before Saving

Feb 9, 2007

I would like to create a macro that looks at a specifc cell with a formula that compares the values of two other cells on the spreadsheet. If the variance is more that $10, I would like a popup window to come up telling the user that they are not in balance. I would like this to happen when they attempt to save the file.

View 3 Replies View Related

Unwanted ActiveX Warning

Jun 7, 2007

I have used the OWC.Spreadsheet 11 object in a form. But since then, I get a warning, usually when I open the spreadsheet, saying "This application is about to initialize an ActiveX Control that might be unsafe. If you trust the source of this file Select OK.etc,etc". I am using Excel 2003. Is there anyway of getting rid of this message? I am worried that users will see it, worry about using it and press cancel instead of OK at the prompt, thus rendering my form useless.

View 4 Replies View Related

Run Macro Without Warning Prompts

Sep 6, 2007

I have an excel document which automatically runs a macro when it opens. The macro itself opens various excel documents, copies, Pastes and Deletes work sheets then saves the updated files in a new location. I simply used the Application. ScreenUpdating = False at the start of the macro and Application.ScreenUpdating = True at the end of the macro to hide all the various opening and closing and formatting of workbooks.

My aim is for the user to be able to open the document, wait a few moments while the macro runs, then be presented with the finished article when the macro ends without any need for interaction. The problem I am getting is as the macro runs, various windows pop up with messages such as "The file C:... already exists do you wish to replace the file" with a yes or no wchoice and "Data may exist in the sheet(s) selected for deletion. with a delete or cancel choice To Permanently delete the data press Delete". What I want to be able to do is stop these windows popping up and for the macro to go ahead with replacing the file or deleting the sheets without being manually told each time.

View 2 Replies View Related

Show Warning For Row Deletion

Dec 11, 2007

I need to test whether one or more rows are about to be deleted in a worksheet.

Users delete rows to edit a worksheet, which affects other columns. I need an opportunity to warn them before the delete occurs.

View 9 Replies View Related

Security Warning (Macros Have Been Disabled)

Apr 28, 2008

I was playing around with Macros on an excel file. I created a few and ran them. In the end, I didn't like the way they ran, so I deleted them all. However since I ran them in the excel file, every time I open the file it gives me a warning saying
"Macros have been disabled."

Is there any way to remove the possible Macros ties/links from my file? I know I can disable the warning, but if I just want to remove the Macros ties to my file.

View 10 Replies View Related

End User See The Warning Enable Macros

Sep 10, 2009

I have a couple spreadsheet Excel 2003 that I have to Email, I use a few macros with these spreadsheets. The Macros are kept in my personal workbook. When I Email these sheets does the end user see the warning enable macros or do they just see the sheet as is. I am mailing the whole workbook but macros are in my personal workbook. If they see the warning is it possible for me to Email so they will not have to contend with that?

View 3 Replies View Related







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