Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finish this sentence

Application.Dialogs(xlDialogColorPalette).Show

this is awesome, but then it doesn't do anything when i chose my color
What are the possibilities

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Finish this sentence

Hi Scott,

Here is one way to use it.

To demonstrate it , type ?ReturnColorindex() in the immediate window, and
you will be returned the number of the colour you choose.

Function ReturnColorindex() As Long
Dim rngCurr As Range
Set rngCurr = Selection
Application.ScreenUpdating = False
Range("IV1").Select
Application.Dialogs(xlDialogPatterns).Show
ReturnColorindex = ActiveCell.Interior.ColorIndex
ActiveCell.Interior.ColorIndex = xlColorIndexAutomatic
rngCurr.Select
End Function


Note, you cannot call this function as a UDF as it updates another cell in
the workbook.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"scottnshelly " wrote in
message ...
Application.Dialogs(xlDialogColorPalette).Show

this is awesome, but then it doesn't do anything when i chose my color.
What are the possibilities?


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finish this sentence

Thanks Bob,
i'm afaid i don't know what you mean by 'immediate window'. Wher
exactly should i put ?ReturnColorIndex() ?
Thanks

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Finish this sentence

Scott,

Normally you would just use this function to return a ColorIndex value, as
selected from the palette. What I was saying was that you could demonstrate
it by typing ?ReturnColorIndex() in the immediate window, so that you can
get used to using it and how it works. To get the immediate window, go to
the View menu in the VBE and click the Immediate Window option. Then just
type that code into the window.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"scottnshelly " wrote in
message ...
Thanks Bob,
i'm afaid i don't know what you mean by 'immediate window'. Where
exactly should i put ?ReturnColorIndex() ?
Thanks,


---
Message posted from http://www.ExcelForum.com/



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
Complicated chart, not sure how to finish it! jinfanti Charts and Charting in Excel 1 September 3rd 08 09:30 AM
Start:Finish with If formula Bongard Excel Discussion (Misc queries) 8 February 19th 07 02:16 PM
Start & Finish Time bosox9 Excel Worksheet Functions 0 July 24th 06 10:01 PM
Finish Spreadsheet Trying Hard Excel Discussion (Misc queries) 1 May 22nd 06 10:56 AM
Need help to finish function.... Dan B Excel Programming 4 October 7th 03 10:06 PM


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