3 Questions actually!

G

grandfilth

HI, first:

I've made a program in excel, and when it loads up i would like only
the program i've made to show, and not any of the excel stuff like the
formula bar, or even the column and row letters/numbers, is this
possible?

I would also like to know if it's possible that when someone presses
the x to close excel they do not get the choice to save what they have
done.

Last question, if i have 2 cells with figures in (e.g. A1 and B1) can i
make a third cell say (A1 "to" B1)?

Any help would be much appreciated...
 
G

Guest

I can answer your third question:

if A1 contains 1 and B1 contains 2 then use the formula:

=A1 & " to " & B1
 
C

Chip Pearson

1) Create a userform that will serve as the interaction between
your application and Excel. In the Initialize event, hide the
Application, and in the Terminate event, show the Application.


Private Sub UserForm_Initialize()
Application.Visible = False
End Sub

Private Sub UserForm_Terminate()
Application.Visible = True
End Sub

2) Set the Saved property of the workbook to True. This will tell
Excel that the workbook does not need saving, and the changes
won't be saved.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub

3) Use the & operator to concatenate text from cells.
=A1&B1


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"grandfilth"
in message
news:[email protected]...
 
N

Nick Hodge

Grandfilth

1) You would use the Workbook_Open event or an Auto_Open macro that runs
when the workbook is opened. In here you can hide everything you don't want
to show the user

2) You could mark the workbook as 'clean' in the Workbook_BeforeClose event
using

Me.Saved=True

this makes the workbook think it is already saved and closes without saving
any changes

3) =A1&" to "&B1

If you need further help with the coding in one and two, post back

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
(e-mail address removed)
 
G

grandfilth

Sorry, I'm not the best at excel...How do you apply these macros? Where
do i type them, how do i link them to my program?
 
G

grandfilth

PLese can someone help me understand this, I'm having problems, i tried
to start up a userform, but I was pretty unsure about how to do it. I
want something that will make my program appear with any of the excel
things showing.
 

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