Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Tickboxes and the macro's behind them

I am having a small problem with a tickbox on a worksheet and I hope someone
can help.

When I click the tickbox to out a tick in it it shows one of the userforms I
have created and then runs the associated macro for the click.

I have debugged the code and it seems that the userform is getting called
before it runs the macro.

I just doesn't make sense to me.

Thanks in advance for any help.

--
Cheers...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 290
Default Tickboxes and the macro's behind them

can you post the code behind the tickbox?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Tickboxes and the macro's behind them

Here's the code behind the tickbox :-

Sub Health_Month_End_Click()
Application.ScreenUpdating = False
Call Sort_Extra_Batch("Healthcare")
End Sub

The "Sort_Extra_Batch" is a routine that I have written. Here's the code
for that :-

Sub Sort_Extra_Batch(System_Name As String)
Sheets("Front End").Select
Select Case System_Name
Case "Life"
Sort_Range = "C15:D29"
Sort_Key = "C15"
Highlight_Cell = "B7"
Case "Bank"
Sort_Range = "G15:H29"
Sort_Key = "G15"
Highlight_Cell = "F7"
Case "Investment"
Sort_Range = "K15:L29"
Sort_Key = "K15"
Highlight_Cell = "J7"
Case "Healthcare"
Sort_Range = "O15:P29"
Sort_Key = "O15"
Highlight_Cell = "N7"
End Select
Range(Sort_Range).Select
Selection.Sort Key1:=Range(Sort_Key), Order1:=xlDescending, Header:=xlNo _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Highlight_Status (Highlight_Cell)
Home_Cell
End Sub

As I said it displays the userform before it executes any of the above code...

--
Cheers...


"Duncan" wrote:

can you post the code behind the tickbox?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 290
Default Tickboxes and the macro's behind them

Sorry Deke,

Forgot to look back at your post.....Im not sure I would have worked
out that a cell was pointing to the wrong place anyway if thats any
consolation!.

ah well, im glad you managed to fix it anyway.

Sorry

Duncan

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
Problem vertically aligning multiple rows with tickboxes added usingVB. Westie New Users to Excel 4 July 27th 06 09:30 AM
Hide Macro's in Toolbar / Macro's list sparx Excel Discussion (Misc queries) 2 May 6th 06 08:53 PM
FILTER: show/don't show selection with tickboxes ancharwashere Excel Discussion (Misc queries) 2 October 11th 05 09:20 PM
macro's ELVIS ARON PRESLEY Excel Worksheet Functions 1 November 10th 04 06:42 PM
Tickboxes on worksheet count Excel Programming 1 April 3rd 04 01:42 AM


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