Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Visitor Monitoring

0

my problem is,i cannot repeat a time in time out in every hour

Answer
Discuss

Answers

0

Once you code encounters the Show command for a form control is given to that form. The form has limited access to the worksheets. If you want full read/write access you must lodge the code in a standard code module. Therefore you need this kind of structure:-

  1. Create the form in a standard code module.
  2. Load whatever you need from the worksheets to the form but avoiding access to the worksheets from theform's module.
  3. Show
    1. End the form's session using the Hide command. This returns control the the standard code module.
  4. Check if any action needs to be taken.
    1. I usually write "1" to the form's Tag property with the "OK" or "Submit" button in the form if everything is OK.
  5. Write to the worksheets if required.
  6. Unload the form in the standard code module.

In the attached workbook I introduced the above setup.I also made the CbxCode a multi-column combobox so as to avoid the many references to the sheet you had. Look for my reference number (253). Wherever you find it I made changes.

Unfortunately, I didn't understand your question. You should explain the work flow into which the form will be integrated.

Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login