i want to work with user forms..

  • Thread starter Thread starter Anil showreddy
  • Start date Start date
A

Anil showreddy

Hi,

i am new to work with macros and user forms...
1) to day i created a macro for increasing or decreasing font size in a
cell.. it is working but i could not apply same shortcut in all excel
books... is there any solution for this?

2) how can i load a user form automatically when i opened the work book?

Thankyou..
 
hi
guessing but you may have the macro in a closed file. for a macro to be
available to all file, it must be in an open file. many users have custom
macros and to make them available to all files, they do it 2 ways.
1. create a personal.xls file to store the macros and save it to the xl
start folder. the personal.xls file is hidden and opens with excel in the
background but all macros will be available to all files.
2. create an addit with the macros that opens with excel.

to have a form open with excel...
Private Sub Workbook_Open()
Load youruserform1
youruserform1.Show 0
End Sub

the zero after show denotes wheather the form is modal or modalless.
a modal form locks excel except for the form and input is require untill the
ok/close/other button is clicked.
with modalless form, you can do other things while the form is open.
clicking on the sheet sets focus on the sheet. clicking on the form return
focus to the form.

Regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top