If you want to try my demos, then the first should be opened, the second can be closed or open, but the second should be in the same folder. The VBA Application.OnTime code line will do this opening, provided it has the full explicit form ) ( In such a case, the closed workbook would be opened. The full explicit syntax would be needed, for example, to ensure the corrects file were opened, when we want to trigger a macro in a closed workbook. _ 2.Showing the full explicit code line syntax helps with my attempt at explain the syntax, and so is needed in answering the question fully. Its easy to simplify it to the more usual shortened version if you only need that, but going the other way, from the more common simplified form to the full explicit form, should you need that, is quite hard. I am deliberately giving very full explicit code lines for two reasons:. concisely explaining / justifying the syntax. So I am sharing my solutions, and finally I think I can have a stab at answering the original question regarding. So I have spent some time making myself some worked examples to reference in the future, and I have also convinced myself finally that I understand what is going on. As often they almost, but did not quite, got me there. I have often come here, as well as arrived a few times at the other links referenced here. I have fought with the tricky syntax for arguments to Application.OnTime ( or Application.Run, which is similar) every time I have needed it. MsgBox ("test1: " & strTest1 & " test2:" & strTest2) Public Sub CallMeOnTime(strTest1 As String, strTest2 As String)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |