Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
dixonpeter
 
Posts: n/a
Default Button to change borders


What I'm after is the VB code to get a button to change a blank cell to
have it checked, i.e diagonal lines through it.

Can anyone help?


--
dixonpeter


------------------------------------------------------------------------
dixonpeter's Profile: http://www.excelforum.com/member.php...fo&userid=2589
View this thread: http://www.excelforum.com/showthread...hreadid=395282

  #2   Report Post  
StinkeyPete
 
Posts: n/a
Default

Try this:

Sub Macro1()
With Selection.Interior
.ColorIndex = 0
.Pattern = xlLightDown
.PatternColorIndex = xlAutomatic
End With

End Sub



"dixonpeter" wrote:


What I'm after is the VB code to get a button to change a blank cell to
have it checked, i.e diagonal lines through it.

Can anyone help?


--
dixonpeter


------------------------------------------------------------------------
dixonpeter's Profile: http://www.excelforum.com/member.php...fo&userid=2589
View this thread: http://www.excelforum.com/showthread...hreadid=395282


  #3   Report Post  
Bryan Hessey
 
Posts: n/a
Default


Record a macro, select a cell or range of cells, set the border you
wish, end recording.
Select Tools, Macro, and Edit the macro, remove the Range("~~").select
line.

Then select any cell or range and run the macro.

For a button, do the above, then copy / paste the code into the button
on button creation.




dixonpeter Wrote:
What I'm after is the VB code to get a button to change a blank cell to
have it checked, i.e diagonal lines through it.

Can anyone help?



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=395282

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
Change caption on a macro button gbeard Excel Worksheet Functions 3 April 21st 05 01:43 PM
Command Button VBA code Dave Peterson Excel Discussion (Misc queries) 2 January 25th 05 11:28 PM
Change cell back color on click Dave Peterson Excel Discussion (Misc queries) 0 January 24th 05 10:50 PM
Macro to simply bring up the Find dialogue box?? marika1981 Excel Discussion (Misc queries) 14 January 14th 05 10:47 PM
Macro button colour change??? Beefyme Excel Worksheet Functions 1 November 19th 04 06:15 PM


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