How can i get the value of the AsktoUpdatelinks form ??
Hi!
I have a problem I have the following code ----------------------------------------------------- Private Sub Workbook_Open() 'Dim active_wb As String 'active_wb = ActiveWorkbook.FullName Application.ScreenUpdating = False 'If Workbooks.Application(Filename:=active_wb, UpdateLinks:=3) Then 'ThisWorkbook.Close savechanges:=False Call Kontres_Update 'End If Worksheets("SH").Activate Application.Goto reference:="R4C9" Application.ScreenUpdating = True End Sub -------------------------------------------------------- When i open the workbook i want to have the value of th 'asktoupdatelinks' because it depends on the call Kontres_Update. In other words if i click on 'No' on the 'asktoupdatelinks' form i don want to call the macro 'Kontres_Update', but when i click on 'Yes' t call it. I tried, as you can see, something but it asks me if i want to sav changes because the workbook is already open Thanks in advance Stathi -- Message posted from http://www.ExcelForum.com |
How can i get the value of the AsktoUpdatelinks form ??
The updatelinks dialog is shown before any macros are run. To the best of
my knowledge, you can not determine what the user has answer except perhaps by checking what the values of linked cells might be and I would be hard pressed to come up with a reliable way to do that. -- Regards, Tom Ogilvy "stakar " wrote in message ... Hi! I have a problem I have the following code ----------------------------------------------------- Private Sub Workbook_Open() 'Dim active_wb As String 'active_wb = ActiveWorkbook.FullName Application.ScreenUpdating = False 'If Workbooks.Application(Filename:=active_wb, UpdateLinks:=3) Then 'ThisWorkbook.Close savechanges:=False Call Kontres_Update 'End If Worksheets("SH").Activate Application.Goto reference:="R4C9" Application.ScreenUpdating = True End Sub -------------------------------------------------------- When i open the workbook i want to have the value of the 'asktoupdatelinks' because it depends on the call Kontres_Update. In other words if i click on 'No' on the 'asktoupdatelinks' form i dont want to call the macro 'Kontres_Update', but when i click on 'Yes' to call it. I tried, as you can see, something but it asks me if i want to save changes because the workbook is already open Thanks in advance Stathis --- Message posted from http://www.ExcelForum.com/ |
How can i get the value of the AsktoUpdatelinks form ??
So, Tom
Theres a way not to showing the updatelinks dialogue but to be a default the 'Yes' Option ? Because my problem is the 'No' option but if the user always check th 'Yes' option it wouldnt be any problem at all!! Thanks Stathis Tom Ogilvy wrote: *The updatelinks dialog is shown before any macros are run. To th best of my knowledge, you can not determine what the user has answer excep perhaps by checking what the values of linked cells might be and I would b hard pressed to come up with a reliable way to do that. -- Regards, Tom Ogilvy "stakar " wrote in message ... Hi! I have a problem I have the following code ----------------------------------------------------- Private Sub Workbook_Open() 'Dim active_wb As String 'active_wb = ActiveWorkbook.FullName Application.ScreenUpdating = False 'If Workbooks.Application(Filename:=active_wb, UpdateLinks:=3 Then 'ThisWorkbook.Close savechanges:=False Call Kontres_Update 'End If Worksheets("SH").Activate Application.Goto reference:="R4C9" Application.ScreenUpdating = True End Sub -------------------------------------------------------- When i open the workbook i want to have the value of the 'asktoupdatelinks' because it depends on the call Kontres_Update. In other words if i click on 'No' on the 'asktoupdatelinks' form dont want to call the macro 'Kontres_Update', but when i click on 'Yes to call it. I tried, as you can see, something but it asks me if i want t save changes because the workbook is already open Thanks in advance Stathis --- Message posted from http://www.ExcelForum.com/ -- Message posted from http://www.ExcelForum.com |
How can i get the value of the AsktoUpdatelinks form ??
there is an application level setting under Tools=Options=Edit tab. (ask
to update automatic links). however, you have no control over this setting with code in the workbook being opened. the query will be performed before any code is run. If you want the links updated, then in the workbook_open event, put in code to update the links. If the user doesn't disable macros, then your code would update the links. Other than that, I guess you would have to put up a message box and ask the user if links were updated. -- Regards, Tom Ogilvy "stakar " wrote in message ... So, Tom Theres a way not to showing the updatelinks dialogue but to be as default the 'Yes' Option ? Because my problem is the 'No' option but if the user always check the 'Yes' option it wouldnt be any problem at all!! Thanks Stathis Tom Ogilvy wrote: *The updatelinks dialog is shown before any macros are run. To the best of my knowledge, you can not determine what the user has answer except perhaps by checking what the values of linked cells might be and I would be hard pressed to come up with a reliable way to do that. -- Regards, Tom Ogilvy "stakar " wrote in message ... Hi! I have a problem I have the following code ----------------------------------------------------- Private Sub Workbook_Open() 'Dim active_wb As String 'active_wb = ActiveWorkbook.FullName Application.ScreenUpdating = False 'If Workbooks.Application(Filename:=active_wb, UpdateLinks:=3) Then 'ThisWorkbook.Close savechanges:=False Call Kontres_Update 'End If Worksheets("SH").Activate Application.Goto reference:="R4C9" Application.ScreenUpdating = True End Sub -------------------------------------------------------- When i open the workbook i want to have the value of the 'asktoupdatelinks' because it depends on the call Kontres_Update. In other words if i click on 'No' on the 'asktoupdatelinks' form i dont want to call the macro 'Kontres_Update', but when i click on 'Yes' to call it. I tried, as you can see, something but it asks me if i want to save changes because the workbook is already open Thanks in advance Stathis --- Message posted from http://www.ExcelForum.com/ * --- Message posted from http://www.ExcelForum.com/ |
How can i get the value of the AsktoUpdatelinks form ??
Thanks Tom
I ll do the second suggestion I ll put a message box to ask the user if the links are updated so t t update the links by his own!! Thanks for the replies Stathis Tom Ogilvy wrote: *there is an application level setting under Tools=Options=Edi tab. (ask to update automatic links). however, you have no control over this setting with code in th workbook being opened. the query will be performed before any code is run. If you want the links updated, then in the workbook_open event, pu in code to update the links. If the user doesn't disable macros, then you code would update the links. Other than that, I guess you would have t put up a message box and ask the user if links were updated. -- Regards, Tom Ogilvy "stakar " wrote in message ... So, Tom Theres a way not to showing the updatelinks dialogue but to be as default the 'Yes' Option ? Because my problem is the 'No' option but if the user always chec the 'Yes' option it wouldnt be any problem at all!! Thanks Stathis Tom Ogilvy wrote: *The updatelinks dialog is shown before any macros are run. T the best of my knowledge, you can not determine what the user has answe except perhaps by checking what the values of linked cells might be and I woul be hard pressed to come up with a reliable way to do that. -- Regards, Tom Ogilvy "stakar " wrote i message ... Hi! I have a problem I have the following code ----------------------------------------------------- Private Sub Workbook_Open() 'Dim active_wb As String 'active_wb = ActiveWorkbook.FullName Application.ScreenUpdating = False 'If Workbooks.Application(Filename:=active_wb, UpdateLinks:=3) Then 'ThisWorkbook.Close savechanges:=False Call Kontres_Update 'End If Worksheets("SH").Activate Application.Goto reference:="R4C9" Application.ScreenUpdating = True End Sub -------------------------------------------------------- When i open the workbook i want to have the value of the 'asktoupdatelinks' because it depends on the cal Kontres_Update. In other words if i click on 'No' on the 'asktoupdatelinks form i dont want to call the macro 'Kontres_Update', but when i click o 'Yes' to call it. I tried, as you can see, something but it asks me if i want to save changes because the workbook is already open Thanks in advance Stathis --- Message posted from http://www.ExcelForum.com/ * --- Message posted from http://www.ExcelForum.com/ -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 11:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com