Excel Excel 2003 Macro

Joined
Jun 26, 2009
Messages
1
Reaction score
0
I have a macro which Changes the case within Excel. This is in my Personal.xls workbook which is hidden, so the macro won't run

The macro is as follows

Option Explicit
Dim objCell As Object





Sub ChangeCase_Show()
frmCase.Show
End Sub

Sub DoCaseChange()
If frmCase.optLower = True Then
LowerCase
ElseIf frmCase.optUpper = True Then
UpperCase
Else
TitleCase
End If
End Sub



Sub LowerCase()
For Each objCell In Selection
objCell.Value = LCase(objCell.Formula)
Next objCell
End Sub

Sub UpperCase()
For Each objCell In Selection
objCell.Value = UCase(objCell.Formula)
Next objCell
End Sub Sub TitleCase()
For Each objCell In Selection
objCell.Value = Application.Proper(objCell.Formula)
Next objCell
End Sub

can anyone tell me how to run from a hidden, unshared, unprotected workbook
 
Joined
Jun 7, 2009
Messages
11
Reaction score
0
what the heck is a personal.xls file. well very simply it is an excell sheet. one of the nice things about an excell file is that you can store VB code in them. so for example every excel sheet you work with could have vb code in it. The vb code can save you time and help you preform common task. one of the nice features of excel is that you can have a "personal" excel file opened every time you start excel.

when you first install excel on your comptuer you don't have a personal.xls file. the first time you try to create a macro you are given an option of saving your macro in your "Personal.xls" file. if you choose to do so excel will save the "Personal.xls" file in the following location if you installed excel to the defaul location that is.
C:\Program Files\Microsoft Office\Office\XLStart
or if you are at a company or you have multiple profiles on your computer it could be in this location.

C:\Documents and Settings\Your_Account_Name\Application Data\Microsoft\Excel\XLSTART
Tip: the Application folder is a system folder and may be hidden. read this help file on how you may view hidden files.

another thing that excel does by default when it created the "Personal.xls" is that while you are in excel you won't see the personal.xls open. to be able to see the Personal.xls file from within excel, from the menu select "window\unhide..." if you don't have a personal file or if it is allready open this option will be greyed out. once you select the "unhide..." option you should be able to select the "Personal.xls" file and open it. TIP = once you can see your "Personal.xls" file you can then select save as to see where it has been created for you by the OS, since this may be different for each machine.

if later on you decide that you don't want to have the "Personal.xls" load every time you start excell you can simply go to the dirrectory and delete it. (TIP: if you have any Macros in your "Personal.xls" they will be lost. you could also move the "Personal.xls" to another location. by doing so when ever excel starts up it won't find the "Personal.xls" file in the XLStart folder.

another fun thing to do is that once you have lots of cooool code in your personal file and you move to a new machine you can bring your "Personal.xls" file with you to your new computer by replaceing the new "Personal.xls" with your old one.

Q: is there a way to move my "Personal.xls" file to a different location and still start up every time excel starts?
A: No.

if you install a new version of excel on your computer you will have to move your old personal.xls file into the new location where your new version of excel is installed.
For example i just installed a new version of excel and i was totally confused why my personal.xls file wasn't opening. when i tried to record a new macro and have it saved to my personal.xls i recieved the following error
 

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

Top