refresh worksheet code
Hi, I Would like to know, how can i refresh a worksheet code with in a standard macro. i mean i wanted to add a line of code inside the standard macro to refresh the worksheet code. Eagerly waiting for reply. with regards nowfal -- nowfal ------------------------------------------------------------------------ nowfal's Profile: http://www.excelforum.com/member.php...o&userid=10003 View this thread: http://www.excelforum.com/showthread...hreadid=397347 |
refresh worksheet code
Hi Nowfal,
To run a worksheet procedure from a standard module, it is necessary to change the worksheet procedure's declaration from Private ( the default) to Public. This done, try something like: '======================== Sub Tester01() Dim WB As Workbook Const sStr As String = "Sheet1" '<<===== CHANGE Set WB = Workbooks("MyNewTest.xls") '<<===== CHANGE WB.Sheets(sStr).Worksheet_Calculate End Sub '<<======================== You may prefer, however, to consider moving the 'refesh' code portion from the worksheet procedure to a sub in a standard module, adding a call in the worksheet event code to the new sub. With this scenario, the 'refresh' code sub can be run on demand like any other procedure in a standard module. --- Regards, Norman "nowfal" wrote in message ... Hi, I Would like to know, how can i refresh a worksheet code with in a standard macro. i mean i wanted to add a line of code inside the standard macro to refresh the worksheet code. Eagerly waiting for reply. with regards nowfal -- nowfal ------------------------------------------------------------------------ nowfal's Profile: http://www.excelforum.com/member.php...o&userid=10003 View this thread: http://www.excelforum.com/showthread...hreadid=397347 |
refresh worksheet code
Thanks Norman, I will try your opinion and comeback if any problem i there -- nowfa ----------------------------------------------------------------------- nowfal's Profile: http://www.excelforum.com/member.php...fo&userid=1000 View this thread: http://www.excelforum.com/showthread.php?threadid=39734 |
All times are GMT +1. The time now is 06:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com