ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multiple questions (https://www.excelbanter.com/excel-programming/407437-multiple-questions.html)

filo666

Multiple questions
 
Hi, I have some things I would like to do:

1) I would like to create a userform that if I select a cell then, the cell
address is obtained (there are this kind of textboxs in the graph forms).

2) I made a program and I would like to create a button in the tool bar (I
know how); what I do not know how to do it is that when the button is presed
(and so my macro modal) then the button will change to activated, when the
button is pressed again my program is deactivated and so the button (like
the design button).

3) how to deactivate the predefined date format, I mean, I would like that
if I type 3-2 it remains as 3-2 and not to be changed to 03-02-2008, I'm
simply not intrested in dates; I also sometimes must write 3/4/3 and I would
like to remain like date (not with date format) and I do not like characters
like ' or "", is it possible???


Thnks for your answers.

Jim Thomlinson

Multiple questions
 
Question 1
Have you considered using a RefEdit control. Open your userform and right
click the Toolbox. Select Additional controls and check off RefEdit.Ctrl.
Assuming your suers are familiar with XL this control should work well.
Question 2
The bottons on your toolbar have a state property. So somthing like this.
cmdMyButton.State = msoButtonUp
or
cmdMyButton.State = msoButtonDown
Question 3
Format your cells as Text. Whatever you enter will be Text.

--
HTH...

Jim Thomlinson


"filo666" wrote:

Hi, I have some things I would like to do:

1) I would like to create a userform that if I select a cell then, the cell
address is obtained (there are this kind of textboxs in the graph forms).

2) I made a program and I would like to create a button in the tool bar (I
know how); what I do not know how to do it is that when the button is presed
(and so my macro modal) then the button will change to activated, when the
button is pressed again my program is deactivated and so the button (like
the design button).

3) how to deactivate the predefined date format, I mean, I would like that
if I type 3-2 it remains as 3-2 and not to be changed to 03-02-2008, I'm
simply not intrested in dates; I also sometimes must write 3/4/3 and I would
like to remain like date (not with date format) and I do not like characters
like ' or "", is it possible???


Thnks for your answers.


filo666

Multiple questions
 
Hi jim, thanks for answering, Question 1 and 2 solved well, however question
number 3 was not, the think is that I'm programming a multi user (lots of
computers) program, some people simply dont like the dates and how they work,
I'm looking for something like

dateformat.enabled = false

or somethink like that; any other ideas???

TIA

"Jim Thomlinson" wrote:

Question 1
Have you considered using a RefEdit control. Open your userform and right
click the Toolbox. Select Additional controls and check off RefEdit.Ctrl.
Assuming your suers are familiar with XL this control should work well.
Question 2
The bottons on your toolbar have a state property. So somthing like this.
cmdMyButton.State = msoButtonUp
or
cmdMyButton.State = msoButtonDown
Question 3
Format your cells as Text. Whatever you enter will be Text.

--
HTH...

Jim Thomlinson


"filo666" wrote:

Hi, I have some things I would like to do:

1) I would like to create a userform that if I select a cell then, the cell
address is obtained (there are this kind of textboxs in the graph forms).

2) I made a program and I would like to create a button in the tool bar (I
know how); what I do not know how to do it is that when the button is presed
(and so my macro modal) then the button will change to activated, when the
button is pressed again my program is deactivated and so the button (like
the design button).

3) how to deactivate the predefined date format, I mean, I would like that
if I type 3-2 it remains as 3-2 and not to be changed to 03-02-2008, I'm
simply not intrested in dates; I also sometimes must write 3/4/3 and I would
like to remain like date (not with date format) and I do not like characters
like ' or "", is it possible???


Thnks for your answers.


Dave Peterson

Multiple questions
 
If you want column A of Sheet1 to be treat those values as text--not interpret
them as dates, you can do it manually by:
select the range
Format|cells|Number tab
choose Text

In code:
Worksheets("sheet1").range("a:a").numberformat = "@"

It isn't a global setting. You have to format the cell as Text (or precede the
entry with an apostrophe: '3/4/3



filo666 wrote:

Hi jim, thanks for answering, Question 1 and 2 solved well, however question
number 3 was not, the think is that I'm programming a multi user (lots of
computers) program, some people simply dont like the dates and how they work,
I'm looking for something like

dateformat.enabled = false

or somethink like that; any other ideas???

TIA

"Jim Thomlinson" wrote:

Question 1
Have you considered using a RefEdit control. Open your userform and right
click the Toolbox. Select Additional controls and check off RefEdit.Ctrl.
Assuming your suers are familiar with XL this control should work well.
Question 2
The bottons on your toolbar have a state property. So somthing like this.
cmdMyButton.State = msoButtonUp
or
cmdMyButton.State = msoButtonDown
Question 3
Format your cells as Text. Whatever you enter will be Text.

--
HTH...

Jim Thomlinson


"filo666" wrote:

Hi, I have some things I would like to do:

1) I would like to create a userform that if I select a cell then, the cell
address is obtained (there are this kind of textboxs in the graph forms).

2) I made a program and I would like to create a button in the tool bar (I
know how); what I do not know how to do it is that when the button is presed
(and so my macro modal) then the button will change to activated, when the
button is pressed again my program is deactivated and so the button (like
the design button).

3) how to deactivate the predefined date format, I mean, I would like that
if I type 3-2 it remains as 3-2 and not to be changed to 03-02-2008, I'm
simply not intrested in dates; I also sometimes must write 3/4/3 and I would
like to remain like date (not with date format) and I do not like characters
like ' or "", is it possible???


Thnks for your answers.


--

Dave Peterson


All times are GMT +1. The time now is 10:14 AM.

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