Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

making sure personal.xls is there 1

Status
Not open for further replies.

RobBroekhuis

Technical User
Oct 15, 2001
1,971
US
Hi all,
I'm writing an Excel install macro that adds some modules to the user's PERSONAL.XLS vbproject. What do I do if the user does not have a PERSONAL.XLS yet? Is there an easy way to generate one (in the correct location, etc)?
Thanks
Rob
 
Just add you your modules to a regular workbook and save to :

Application.StartupPath.

Activate the workbook and execute ActiveWindow.Visible = False before saving it to the path returned by Application.StartupPath.

(ActiveWorkbook.SaveAs FileName:= Application.StartupPath &"\" & Personal.xls)

AC
 
Follow-up question: what if the module (e.g. userform) I need is already there? VB generates an error when I try to import one with an identical name, and I can't find a way to remove the old one.
What am I missing?
Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top