Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default 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



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Charts dont refresh to show changes to data sheet Chrisso Charts and Charting in Excel 0 August 26th 09 05:27 PM
dont show zero vaules in a chart Donald Watkins Charts and Charting in Excel 7 April 8th 09 04:40 AM
Show a message but not in MsgBox RobN[_2_] Excel Discussion (Misc queries) 2 May 30th 08 11:58 PM
graph, data lables value, dont show zero values Madeleine Charts and Charting in Excel 1 February 14th 08 05:55 PM
Show msgbox only when.... Tod Excel Programming 3 July 29th 03 06:21 PM


All times are GMT +1. The time now is 04:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"