![]() |
Dont show msgbox again
Iv got a code that looks at value A1 of sheet "test.xls"
If it sees a 1 in the cell it displays a mesgbox asking do you want to update. If it does not see a 1 in cell A1 of sheet "test", the messagebox never pops up. Is there a way in code for the user to have an option to never show that message again? Thank you Todd Huttenstine |
Dont show msgbox again
The below code actually looks in...
Folder: "Q:\CS Management Reports\Reports Setup\Administrator Files" File: "Administrator Setup.xls" Sheet: "Reports Setup" cell: F6 and if the value is 1 the true part of the code runs. This part of the code contains the msgbox. If there is a different type of msgbox needed please let me know. Public Sub Workbook_Open() Dim FileFrom As String Dim FileTo As String Dim FName As String Dim Res As Long Dim UName As String * 255 Dim NN Dim L As Long: L = 255 Dim WB As Workbook 'Adds new workbook so code below can work Workbooks.Add Set WB = ActiveWorkbook 'Runs the WindowsUserName function to set reference to Library WindowsUserName.WindowsUserName 'Runs the WindowsUserName code and trims the blanks 'Sets the variable NN to the current 5 and 2 Res = GetUserName(UName, L) UName = Left$(UName, L - 1) NN = Trim(UName) p = "Q:\CS Management Reports\Reports Setup\Administrator Files" f = "Administrator Setup.xls" s = "Reports Setup" a = "F6" 'MsgBox GetValue(p, f, s, a) If GetValue(p, f, s, a) = 1 Then If MsgBox("An upgrade is available for Ops Reports. Would you like to upgrade now?", vbYesNo) = vbNo Then 'Code below if answer is NO With CreateObject("Wscript.Shell") .Popup ("Program Update Aborted! Now quitting Updater...") _ , 1, "Ops Reports Updater", 64 End With WB.Close Exit Sub Else 'Code below if answer is YES Workbooks("ImportData.xls").Close savechanges = False 'Copys ImportData.xls from Setup directory to users XLSTART directory FileFrom = "Q:\CS Management Reports\Reports Setup\Administrator Files\Install Files\ImportData.xls" FileTo = Application.StartupPath & "\ImportData.xls" FileCopy FileFrom, FileTo DoEvents With CreateObject("Wscript.Shell") .Popup ("Ops Reports Program Update Successfull! Now quitting Updater...") _ , 1, "Ops Reports Updater", 64 End With 'Opens ImportData.xls after overwrite Workbooks.Open (Application.StartupPath & "\ImportData.xls") WB.Close Exit Sub End If End If 'Closes created workbook from start of code if no update is available WB.Close End Sub -----Original Message----- post your code -- Don Guillett SalesAid Software "Todd Huttenstine" wrote in message ... Iv got a code that looks at value A1 of sheet "test.xls" If it sees a 1 in the cell it displays a mesgbox asking do you want to update. If it does not see a 1 in cell A1 of sheet "test", the messagebox never pops up. Is there a way in code for the user to have an option to never show that message again? Thank you Todd Huttenstine . |
Dont show msgbox again
No built in options - you would have to write the code.
This means you would have to store the fact that it is no longer desired someplace that is persistent, then check what is stored there to see whether to show it or not. -- Regards, Tom Ogilvy "Todd Huttenstine" wrote in message ... Iv got a code that looks at value A1 of sheet "test.xls" If it sees a 1 in the cell it displays a mesgbox asking do you want to update. If it does not see a 1 in cell A1 of sheet "test", the messagebox never pops up. Is there a way in code for the user to have an option to never show that message again? Thank you Todd Huttenstine |
Dont show msgbox again
Format A1 with no decimal places.
When you want to disable the pop-up, change the value to 1.1. It won't see a 1 in A1 anymore but your users will. Todd Huttenstine wrote: Iv got a code that looks at value A1 of sheet "test.xls" If it sees a 1 in the cell it displays a mesgbox asking do you want to update. If it does not see a 1 in cell A1 of sheet "test", the messagebox never pops up. Is there a way in code for the user to have an option to never show that message again? Thank you Todd Huttenstine |
All times are GMT +1. The time now is 11:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com