Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default Button caption won't update

I am running a sub that updates a cell in excel and then in turn updates the
caption property of my button to the value in the cell ('AlarmTime', which
is a number representing a date which is appropriately formatted to update
the caption:

Frm_DataEntry.Controls.Item("Btn_CALLBACKDATE").Ca ption =
Format(dbAlarmTime, "dddd dd mmmm hh:hh")

I have stepped through all the code and it all works exactly as it should
except for the last line (the line above that updates the button).

I replaced the number/date variable woith a string value to check my
referencing of the button... again it updated perfectly, so my only possible
explanation is that the button doesn't like my formatting, but then I use it
elsewhere to update the button and increment the time by one hour (the
subject of my last post) and although there's a bit of a bug in that it
updates a minute too much, it does update, so I am totally confounded as to
what could be the problem! Anyone any ideas?

Thanks in advance, regards, Mark


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Button caption won't update


Shouldn't this line
Frm_DataEntry.Controls.Item("Btn_CALLBACKDATE").Ca ption
=
Format(dbAlarmTime, "dddd dd mmmm hh:hh")look like this
Frm_DataEntry.Controls.Item("Btn_CALLBACKDATE").Ca ption =
_
Format(dbAlarmTime, "dddd dd mmmm hh:*mm*")

Mark Stephens;237281 Wrote:
I am running a sub that updates a cell in excel and then in turn updates
the
caption property of my button to the value in the cell ('AlarmTime',
which
is a number representing a date which is appropriately formatted to
update
the caption:

Frm_DataEntry.Controls.Item("Btn_CALLBACKDATE").Ca ption =
Format(dbAlarmTime, "dddd dd mmmm hh:hh")

I have stepped through all the code and it all works exactly as it
should
except for the last line (the line above that updates the button).

I replaced the number/date variable woith a string value to check my
referencing of the button... again it updated perfectly, so my only
possible
explanation is that the button doesn't like my formatting, but then I
use it
elsewhere to update the button and increment the time by one hour (the
subject of my last post) and although there's a bit of a bug in that it
updates a minute too much, it does update, so I am totally confounded
as to
what could be the problem! Anyone any ideas?

Thanks in advance, regards, Mark



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=66225

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default Button caption won't update

Hi Simon,

Many, many thanks for that you actually solved two problems in one for me,
as I thought my button caption wasn't updating but it was I just not seeing
it due to not asking to se the minutes (as in mm). Seems so obvious now I
know what it was...that's the good thing about programming, stops you from
getting glib:)

Thanks again, kind regards, Masrk

"Simon Lloyd" wrote in message
...

Shouldn't this line
Frm_DataEntry.Controls.Item("Btn_CALLBACKDATE").Ca ption
=
Format(dbAlarmTime, "dddd dd mmmm hh:hh")look like this
Frm_DataEntry.Controls.Item("Btn_CALLBACKDATE").Ca ption =
_
Format(dbAlarmTime, "dddd dd mmmm hh:*mm*")

Mark Stephens;237281 Wrote:
I am running a sub that updates a cell in excel and then in turn updates
the
caption property of my button to the value in the cell ('AlarmTime',
which
is a number representing a date which is appropriately formatted to
update
the caption:

Frm_DataEntry.Controls.Item("Btn_CALLBACKDATE").Ca ption =
Format(dbAlarmTime, "dddd dd mmmm hh:hh")

I have stepped through all the code and it all works exactly as it
should
except for the last line (the line above that updates the button).

I replaced the number/date variable woith a string value to check my
referencing of the button... again it updated perfectly, so my only
possible
explanation is that the button doesn't like my formatting, but then I
use it
elsewhere to update the button and increment the time by one hour (the
subject of my last post) and although there's a bit of a bug in that it
updates a minute too much, it does update, so I am totally confounded
as to
what could be the problem! Anyone any ideas?

Thanks in advance, regards, Mark



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile:
http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=66225



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Button caption won't update


I'm glad the we, at The Code Cage could help! :)

Mark Stephens;237335 Wrote:
Hi Simon,

Many, many thanks for that you actually solved two problems in one for
me,
as I thought my button caption wasn't updating but it was I just not
seeing
it due to not asking to se the minutes (as in mm). Seems so obvious now
I
know what it was...that's the good thing about programming, stops you
from
getting glib:)

Thanks again, kind regards, Masrk

"Simon Lloyd" wrote in message
...

Shouldn't this line
Frm_DataEntry.Controls.Item("Btn_CALLBACKDATE").Ca ption
=
Format(dbAlarmTime, "dddd dd mmmm hh:hh")look like this
Frm_DataEntry.Controls.Item("Btn_CALLBACKDATE").Ca ption =
_
Format(dbAlarmTime, "dddd dd mmmm hh:*mm*")

Mark Stephens;237281 Wrote:
I am running a sub that updates a cell in excel and then in turn

updates
the
caption property of my button to the value in the cell ('AlarmTime',
which
is a number representing a date which is appropriately formatted to
update
the caption:

Frm_DataEntry.Controls.Item("Btn_CALLBACKDATE").Ca ption =
Format(dbAlarmTime, "dddd dd mmmm hh:hh")

I have stepped through all the code and it all works exactly as it
should
except for the last line (the line above that updates the button).

I replaced the number/date variable woith a string value to check my
referencing of the button... again it updated perfectly, so my only
possible
explanation is that the button doesn't like my formatting, but then

I
use it
elsewhere to update the button and increment the time by one hour

(the
subject of my last post) and although there's a bit of a bug in that

it
updates a minute too much, it does update, so I am totally

confounded
as to
what could be the problem! Anyone any ideas?

Thanks in advance, regards, Mark



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' ('The Code Cage' (http://www.thecodecage.com))

------------------------------------------------------------------------
Simon Lloyd's Profile:
'The Code Cage Forums - View Profile: Simon Lloyd'

(http://www.thecodecage.com/forumz/member.php?userid=1)
View this thread: 'Button caption won't update - The Code Cage

Forums' (http://www.thecodecage.com/forumz/sh...ad.php?t=66225)



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=66225

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
Set Button Caption Nigel Excel Programming 1 February 2nd 09 09:58 PM
How to change Button Caption? BrianB Excel Programming 3 June 1st 05 06:24 PM
Update the time in a form caption jarosinski2 Excel Programming 3 April 8th 05 07:39 AM
Userform - Label Caption - How to update from a variable Alan Excel Programming 3 August 2nd 04 04:39 AM
Caption of a button Dr_Phil Excel Programming 4 May 4th 04 09:13 PM


All times are GMT +1. The time now is 03:58 PM.

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"