Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trying to get a form to set a style


The boss is forever telling me how wonderful my computer skills are.
This is so she doesn't have to hire--and pay--people who actuall
*know* what they're doing. Sigh.

I am trying to create a subroutine in which a button, when clicked
will move to a cell, set its style to a previously defined style othe
than its current one (called Chaku), and return to the original activ
cell. I originally tried to get it to just change the style withou
moving the active cell (using Offset within the Range parameter), but
got a subscript-out-of-range error.

Anyway, the line it's choking on is:

Worksheets("PaymentSheet").Range(ActiveCell).Style .Name
"Chaku"

I've also tried it with quotes around "Active Cell," but in both case
I get an application- or user-defined error. What am I doing wrong?

Thanks

--
cheaperThanAPr
-----------------------------------------------------------------------
cheaperThanAPro's Profile: http://www.excelforum.com/member.php...fo&userid=2824
View this thread: http://www.excelforum.com/showthread.php?threadid=47795

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Trying to get a form to set a style

ctap,
Try...
ActiveCell.Style = "Chaku"
Jim Cone
San Francisco, USA


"cheaperThanAPro" wrote...

The boss is forever telling me how wonderful my computer skills are.
This is so she doesn't have to hire--and pay--people who actually
*know* what they're doing. Sigh.
I am trying to create a subroutine in which a button, when clicked,
will move to a cell, set its style to a previously defined style other
than its current one (called Chaku), and return to the original active
cell. I originally tried to get it to just change the style without
moving the active cell (using Offset within the Range parameter), but I
got a subscript-out-of-range error.
Anyway, the line it's choking on is:
Worksheets("PaymentSheet").Range(ActiveCell).Style .Name =
"Chaku"
I've also tried it with quotes around "Active Cell," but in both cases
I get an application- or user-defined error. What am I doing wrong?
Thanks!
cheaperThanAPro

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trying to get a form to set a style


Wow, when all else fails, try what I would make the command. ^_^

Thanks so much, Jim! Don't suppose you also know how to get it to tab
through the fields of the form when my users use it, do you? All I can
find is instructions for setting how they tab in the VBA editor, about
which I don't care in the least.

Thanks again!

ctap


--
cheaperThanAPro
------------------------------------------------------------------------
cheaperThanAPro's Profile: http://www.excelforum.com/member.php...o&userid=28241
View this thread: http://www.excelforum.com/showthread...hreadid=477951

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Trying to get a form to set a style

ctap,
One way is to unlock the cells you want to tab into.
Then protect the worksheet.

Jim Cone
San Francisco, USA


"cheaperThanAPro" wrote...
Wow, when all else fails, try what I would make the command. ^_^
Thanks so much, Jim! Don't suppose you also know how to get it to tab
through the fields of the form when my users use it, do you? All I can
find is instructions for setting how they tab in the VBA editor, about
which I don't care in the least.
Thanks again!

ctap



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trying to get a form to set a style


The problem is tabbing through a UserForm. I've got the Tab order set.
I've checked the Enabled, Locked, and TabKeyBehavior properties. For
some reason, when I load the form, the cursor is in the first text box,
where it should be, but when I hit the tab, it skips over the following
seven items, appears in the eighth, and will not be budged from there.


--
cheaperThanAPro
------------------------------------------------------------------------
cheaperThanAPro's Profile: http://www.excelforum.com/member.php...o&userid=28241
View this thread: http://www.excelforum.com/showthread...hreadid=477951



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Trying to get a form to set a style

ctap,
Ok, so now we are talking about a "UserForm"...
Check the "TabStop" property for each textbox.
Should be set to True.
Jim Cone
San Francisco, USA



"cheaperThanAPro" wrote
The problem is tabbing through a UserForm. I've got the Tab order set.
I've checked the Enabled, Locked, and TabKeyBehavior properties. For
some reason, when I load the form, the cursor is in the first text box,
where it should be, but when I hit the tab, it skips over the following
seven items, appears in the eighth, and will not be budged from there.
--
cheaperThanAPro

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
How to stop style for col A changing to style of co D date vs $ Knowledge Seeker Setting up and Configuration of Excel 0 April 15th 08 03:26 PM
Form CheckBox font size / style tikchye_oldLearner57 Excel Discussion (Misc queries) 2 March 15th 07 01:34 AM
How do I change sheet notation from R1C1 style to A1 style in XL 2 Sherlock1506 Setting up and Configuration of Excel 1 December 5th 06 03:22 PM
Changing from format style to list style B.W. Excel Worksheet Functions 1 November 22nd 06 07:53 PM
How do I convert US style dates to European style? Neo Excel Discussion (Misc queries) 3 October 15th 06 02:24 PM


All times are GMT +1. The time now is 11:15 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"