Home > Software engineering >  Double-click to open an excel file, the work contents of the refresh process
Double-click to open an excel file, the work contents of the refresh process

Time:09-16

Problems about is this: I wrote in a.x la inside a function, called: Test_Func (), the function is as follows:
 
The Function Test_Func ()
The Debug. Print "Test_Func
"End the Function


Then I built a blank document, in a certain unit style with this function, and then save the workbook, finally, double-click to open the results I see "Test_Func" appeared twice in the console,

My question is: Test_Func call process of the two is what? Or double-click to open the workbook will refresh response function??

CodePudding user response:

You can use msgbox instead of the debug. Print a try, I don't here to save and open the pop-up prompts, only input=test_func () return the tip will pop up.
There is also a situation, it is function contains the cell as a parameter, the content of cells, when there is a change should also prompt will appear.

CodePudding user response:

reference 1st floor milaoshu1020 response:
. You can use msgbox instead of the debug print a try, I don't here to save and open the pop-up prompts, only input=test_func () return the tip will pop up.
There is also a situation, it is function contains the cell as a parameter, the content changes of the cell, also should be popups.
I was inside the cell entered=test_func (), then I save the work thin, close the excel, after reopening, there will be two records, I want to know is, what can open this workbook response function,

CodePudding user response:

First of all, you have to use MsgBox instead of the Debug. Print try.
Secondly, I use your code, open the workbook will not have two records.
  •  Tags:  
  • VBA
  • Related