Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default On_change , Upper case, file SaveAs

Please help

I am trying to automate a spreadsheet and have come across
the following problems:

1. I want to enter dates and times in one column,
whenever the corresponding entry is altered in another
column. How do I do this Visual Basic?

2. I want to convert data, on entry, in particular cells
from lower case to upper case. I can use validation rules
to force upper case data entry, but this is not the
complete user-friendly solution. How can I 'format' the
cells so that any data entries are automatically converted
to upper case?

3. And finally, I wish to trap the 'Cancel' and 'No'
button returns from the SaveAs dialog box. The SaveAs
command does not appear to return a response code in the
same waythat the GetSaveAsFilename command does. How do I
get round this.

Many thanks for any light you can shed on these problems.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default On_change , Upper case, file SaveAs

Hello Nigel
1) Right click on worksheet tab, View code and paste and amend accordingly
the following example:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A20")) Is Nothing Then
Target.Offset(, 2).Value = Date
End If
End Sub
2)Right click on worksheet tab, View code and paste and amend accordingly
the following example:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A20")) Is Nothing Then
Target.Value = Ucase(Target.Value)
End If
End Sub

3) in the following exemplae response will return False if Save As operation
is cancelled
Sub testit()
response = Application.Dialogs(xlDialogSaveAs).Show
MsgBox response
End Sub

HTH
Regards
Pascal



"Nigel Stevens" a écrit dans le
message de ...
Please help

I am trying to automate a spreadsheet and have come across
the following problems:

1. I want to enter dates and times in one column,
whenever the corresponding entry is altered in another
column. How do I do this Visual Basic?

2. I want to convert data, on entry, in particular cells
from lower case to upper case. I can use validation rules
to force upper case data entry, but this is not the
complete user-friendly solution. How can I 'format' the
cells so that any data entries are automatically converted
to upper case?

3. And finally, I wish to trap the 'Cancel' and 'No'
button returns from the SaveAs dialog box. The SaveAs
command does not appear to return a response code in the
same waythat the GetSaveAsFilename command does. How do I
get round this.

Many thanks for any light you can shed on these problems.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default On_change , Upper case, file SaveAs

Hi
just some minor additions (also combining 1+2 in one
macro):

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A20")) Is Nothing Then
on error goto errhandler
with target
application.enableevents=false
..Offset(, 2).Value = Date
..value=ucase(.value)
end with
End If

errhandler:
application.enableevents=true
End Sub

-----Original Message-----
Hello Nigel
1) Right click on worksheet tab, View code and paste and

amend accordingly
the following example:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A20")) Is Nothing Then
Target.Offset(, 2).Value = Date
End If
End Sub
2)Right click on worksheet tab, View code and paste and

amend accordingly
the following example:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A20")) Is Nothing Then
Target.Value = Ucase(Target.Value)
End If
End Sub

3) in the following exemplae response will return False

if Save As operation
is cancelled
Sub testit()
response = Application.Dialogs(xlDialogSaveAs).Show
MsgBox response
End Sub

HTH
Regards
Pascal



"Nigel Stevens" a

écrit dans le
message de ...
Please help

I am trying to automate a spreadsheet and have come

across
the following problems:

1. I want to enter dates and times in one column,
whenever the corresponding entry is altered in another
column. How do I do this Visual Basic?

2. I want to convert data, on entry, in particular

cells
from lower case to upper case. I can use validation

rules
to force upper case data entry, but this is not the
complete user-friendly solution. How can I 'format' the
cells so that any data entries are automatically

converted
to upper case?

3. And finally, I wish to trap the 'Cancel' and 'No'
button returns from the SaveAs dialog box. The SaveAs
command does not appear to return a response code in the
same waythat the GetSaveAsFilename command does. How

do I
get round this.

Many thanks for any light you can shed on these

problems.


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert lower to upper case automatically without using UPPER Sal Excel Discussion (Misc queries) 6 July 26th 09 11:27 AM
Changing multiple cell text from lower case to upper case Patti Excel Discussion (Misc queries) 2 January 4th 08 08:35 PM
Changing upper case characters to upper/lower Richard Zignego Excel Discussion (Misc queries) 1 December 17th 07 10:09 PM
Changing file in all upper case to upper and lower case Sagit Excel Discussion (Misc queries) 15 May 30th 07 06:08 AM
How do I convert all upper case excel sheet into upper and lower . DebDay Excel Discussion (Misc queries) 1 March 9th 05 08:31 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"