ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Quick question (https://www.excelbanter.com/excel-programming/368653-quick-question.html)

Dr Fleau

Quick question
 
Hey y'alls, I'm new to to the ng, please be gentle.
I created a few macros for some spreadsheets I use at work. I understand
that all the macros are saved in a specific file, mine is called
"Perso.xls", the french version of yours, I guess. For a few days now, when
I open a blank Excel file, say to create a new one, it's isn't one called
"New document" that opens, but "Perso.xls". Also, when I open a file the
already has macros applied to it, "Perso.xls" opens right alongside the file
I want to open. It has been doing this for 2 days, since I opened the editor
to see the code. I don't remember touching anything, just open , look, and
shut.

It's a little annoying, please help.

Thanx a bunch

Dr Fleau



Tom Ogilvy

Quick question
 
Perso.xls will open whenever excel is opened. Usually the file is marked as
hidden, so it isn't visible to your. However, it sounds like you unhide it
and saved it. If any file is opened (as visible) in Excel, then a generic
Book1 file is not created - so that is also consistent with your description.
To reverse this, with perso.xls as the activeworkbook, go to Window=Hide
and hide Perso.xls. Then record a macro and close excel (so perso.xls has
changed). You should be prompted as to whether you want to save changes to
Perso.xls. Say yes. Alternately, rather than record the dummy macro, don't
close Excel, but go to the vbe, select perso.xls in the project explorer (to
make it the active file) and then do File = Save Perso.xls in the vba. (it
should say Save Perso.xls or you have the wrong file as the active project).

another approach:

move this file (Perso.xls) to a new location and give it a different name.

then record a macro so a new perso.xls is created. Now open the old file
(with its new name from the new location) and copy your macro across to
perso.xls (in the VBE, just do copy and paste of the text in the modules).

--
Regards,
Tom Ogilvy



"Dr Fleau" wrote:

Hey y'alls, I'm new to to the ng, please be gentle.
I created a few macros for some spreadsheets I use at work. I understand
that all the macros are saved in a specific file, mine is called
"Perso.xls", the french version of yours, I guess. For a few days now, when
I open a blank Excel file, say to create a new one, it's isn't one called
"New document" that opens, but "Perso.xls". Also, when I open a file the
already has macros applied to it, "Perso.xls" opens right alongside the file
I want to open. It has been doing this for 2 days, since I opened the editor
to see the code. I don't remember touching anything, just open , look, and
shut.

It's a little annoying, please help.

Thanx a bunch

Dr Fleau




Peter T

Quick question
 
Macros (VBA code) can go in any workbook, but Personal.xls (Perso.xls in
French ?) is a convenient place to put macros you always want available.

This file should exist in your startup folder so it loads each time. After
editing code close all its module windows and collapse the 'tree' against
it's name in the top left panel. Assuming of course you actually opened the
VBE and edited your macros there. In Excel ensure it is hidden, If it isn't
make it active and hide it - on the main menu bar Window Hide.

When you close Excel accept the prompt to save Personal.xls

Regards,
Peter T

"Dr Fleau" wrote in message
news:PZoyg.170055$S61.28779@edtnps90...
Hey y'alls, I'm new to to the ng, please be gentle.
I created a few macros for some spreadsheets I use at work. I understand
that all the macros are saved in a specific file, mine is called
"Perso.xls", the french version of yours, I guess. For a few days now,

when
I open a blank Excel file, say to create a new one, it's isn't one called
"New document" that opens, but "Perso.xls". Also, when I open a file the
already has macros applied to it, "Perso.xls" opens right alongside the

file
I want to open. It has been doing this for 2 days, since I opened the

editor
to see the code. I don't remember touching anything, just open , look, and
shut.

It's a little annoying, please help.

Thanx a bunch

Dr Fleau





Dr Fleau

Quick question
 
Thank you very much Tom and Peter for your quick and very effective answers.

May Allah bless your camels with numerous humps.

Dr Fleau




All times are GMT +1. The time now is 05:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com