some questions..


Posted by karin on July 16, 2001 10:46 AM

i have a few question if anyone can help me:
1. how can i make a form run automaticaly when
i open my xls file?

2. i have a worksheet that i use to calculate data
that i dont want the users to see, and still want
be able to do opertions like select,paste and so..
i tried Worksheets("files").Visible = xlVeryHidden
but it didnt work. the worksheet was hidden but
i couldnt use it in my code

Posted by Cory on July 16, 2001 11:06 AM

For the first one go into "This Workbook" code module (left side of VBE screen where sheets are listed) and enter the following code into the Workbook_Open() handler:

Form1.show

Where "Form1" is the name of your form.

The second one I'm not sure about. Try adding:

application.screenupdating = false
sheets("Sheet1").visible = xlsheetvisible
(your code here)
sheets("Sheet1").visible = xlsheetveryhidden

The application.screenupdating makes it where you don't see excel doing anything until the code has finished running. So long as you hide the worksheet again before the end of the code, the user shouldn't see the sheet at all.

Any help?

Cory



Posted by karin on July 16, 2001 11:39 AM

thanks i will try this


:)