Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default JLatham 2-timing on T.Valko now are we? :)

Thats two days in a row you put a smile on my face JLatham
If you keep this up you might become the Sweetheart of the month. Attracting
the female audience is always good. aussiegirlone :)
On asking Question:
I had made an error in my question as I meant to say €śchange the days not
Date €ś

You wrote:
€śWhat do you mean by "named" - do you mean you actually named it that or that
Sunday is what appears on the button. Also, where did you get the button
from: the Forms menu tools or the Controls Toolbox menu?€ť
My Answers.
Sunday is what appears on the button and the controls toolbox is what I am
using. (Is there a difference between the forms menu tools or controls
toolbox?) If yes please explain. This is the code I used for the command
button.

Private Sub CommandButton1_Click()
Worksheets("IncidentDesription").Select
Application.Goto Worksheets("IncidentDesription").Range("A1"), Scroll:=True
'or false??
End Sub

To explain what I have done to my work book (PS: if you need a copy ask
T.Valko.) In sheet named (Incident report) I created a command button. Which
will on click goto a sheet named IncidentDescription. On sheet3 B13-H13 are
the Weekdays which when I decide to change the day from Sunday to any other
day of the week, all sheets will change automatically accept my command
buttons name (Sunday.) Sheet3 is where all changes will be made and all other
sheets will be (eventually) locked so no changes can be made to them
I am a self learner in which I get nervous to do things, concerned that I
would stuff up.

(I see the code dave Peterson wrote for me, that (mmmm dd yyyy) is the date.
Is this still ok to use or does it need to be changed?)
Dave Peterson wrote:
You can use a worksheet event under the worksheet that contains the cell.

Rightclick on the worksheet tab with the changing cell. Select view code.
Paste this into the newly opened code window:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myCell As Range
Set myCell = Me.Range("A1")

If Target.Cells.Count 1 Then
Exit Sub 'one cell at a time
End If

If Intersect(Target, myCell) Is Nothing Then
Exit Sub
End If

Worksheets("sheet1").CommandButton1.Caption _
= Format(myCell.Value, "mmmm dd, yyyy")

End Sub

You'll have to change the cell to look at (I used A1). As well as the other
worksheet's name, the commandbutton's name and use the caption you want.

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
T.Valko aussiegirlone Excel Discussion (Misc queries) 1 December 17th 08 05:31 PM
Hey! T. Valko JLatham Excel Discussion (Misc queries) 7 December 17th 08 02:10 PM
MR T VALKO ..PLZ HELP pierre Excel Discussion (Misc queries) 1 June 4th 08 09:27 PM
TO mr t.valko... pierre Excel Discussion (Misc queries) 7 May 31st 08 07:30 PM
JLatham MVP (Macro) Mike Excel Discussion (Misc queries) 3 December 31st 06 06:34 AM


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

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

About Us

"It's about Microsoft Excel"