Excel Help again - sorry. Precedding Zero's

Permabanned
Joined
24 Nov 2006
Posts
560
Hi all,

I have a user form which asks the user to enter a phone number including area code, which the form then places into a worksheet

THing is, Excel drops the first '0' so 01344 appears as 1344

What to do?
 
thanks both. Daves way is slightly better
:)

Do you know of a way to always Open sheet1 regardless of what last sheet was open when Excel shut?
 
Faithless said:
thanks both. Daves way is slightly better
:)

Do you know of a way to always Open sheet1 regardless of what last sheet was open when Excel shut?
NP, not sure on the saving though as I've never needed to do that :confused:
 
Faithless said:
thanks both. Daves way is slightly better
:)

Do you know of a way to always Open sheet1 regardless of what last sheet was open when Excel shut?

I don't think there is an option to specify a default worksheet for a workbook.

One way of doing this is to create an auto_open macro. Open up the VBA editor, insert a module and dump the following code into it.

Sub auto_open()

Sheet1.Select

End Sub

If you aren't confident with the VBA editor you could just record a macro of you switching to sheet1 (you need to be on a different sheet when you start recording). The important part is for it to be called auto_open as Excel runs this macro on opening the spreadsheet that contains it.
 
Back
Top Bottom