Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default macros don't work


hey,

i hope someone can help. Could you please give me reasons for m
macros not working, its nothing to do with the code, its something i
the excel program itself, when i run a macro nothing happens, its as i
an option has been switched off. So could you give me any reason othe
than duff macro code as to why the macro wouldn't work, for example i
you had macros switched off when you try and ran them they wouldn'
work.

Thank

--
alymcmorlan
-----------------------------------------------------------------------
alymcmorland's Profile: http://www.excelforum.com/member.php...fo&userid=2765
View this thread: http://www.excelforum.com/showthread.php?threadid=47871

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default macros don't work

How do you know it is not the macros themselves?

Post the code and details of what you are trying to do.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"alymcmorland"
wrote in message
news:alymcmorland.1xeiee_1130148310.8663@excelforu m-nospam.com...

hey,

i hope someone can help. Could you please give me reasons for my
macros not working, its nothing to do with the code, its something in
the excel program itself, when i run a macro nothing happens, its as if
an option has been switched off. So could you give me any reason other
than duff macro code as to why the macro wouldn't work, for example if
you had macros switched off when you try and ran them they wouldn't
work.

Thanks


--
alymcmorland
------------------------------------------------------------------------
alymcmorland's Profile:

http://www.excelforum.com/member.php...o&userid=27652
View this thread: http://www.excelforum.com/showthread...hreadid=478716



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default macros don't work


Can anyone see anything wrong with this code, because when i try execute
each one nothing happens and its as if i haven't executed anything at
all!


Code:
--------------------

Sub Macro_ContractTermination()
Dim c As Range


For Each c In Range(ActiveCell, Cells(370, ActiveCell.Column))
If c.Interior.ColorIndex = 15 Or c.Interior.ColorIndex < 0 And Len(c) = 0 And c.FormulaR1C1 = "" Then
c.Interior.ColorIndex = 56
End If

Next c

End Sub


Sub Macro_ContractReinablation()
Dim c As Range


For Each c In Range(ActiveCell, Cells(370, ActiveCell.Column))
If c.Interior.ColorIndex = 56 Or c.Interior.ColorIndex < 0 And Len(c) = 0 And c.FormulaR1C1 = "" Then
c.Interior.ColorIndex = 15
End If

Next c

End Sub


Sub Macro_BankHoliday()
Dim c As Range


For Each c In Range(Cells(ActiveCell.Row, 4), Cells(ActiveCell.Row, 56))
If c.Interior.ColorIndex = 56 Or c.Interior.ColorIndex < 0 And Len(c) = 0 And c.FormulaR1C1 = "" Then
c.Interior.ColorIndex = 15
End If

Next c

End Sub


Sub Macro_WorkingDay()
Dim c As Range


For Each c In Range(Cells(ActiveCell.Row, 4), Cells(ActiveCell.Row, 56))
If c.Interior.ColorIndex = 15 Or c.Interior.ColorIndex < 0 And Len(c) = 0 And c.FormulaR1C1 = "" Then
c.Interior.ColorIndex = 56
End If

Next c

End Sub


--------------------


--
alymcmorland
------------------------------------------------------------------------
alymcmorland's Profile: http://www.excelforum.com/member.php...o&userid=27652
View this thread: http://www.excelforum.com/showthread...hreadid=478716

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default macros don't work


All i needed to know is if the code itself is faulty, but if you guy
can't see anything wrong with it then it has to be my excel playing up
In my mind these macros should work! Not to worry then.

Thank

--
alymcmorlan
-----------------------------------------------------------------------
alymcmorland's Profile: http://www.excelforum.com/member.php...fo&userid=2765
View this thread: http://www.excelforum.com/showthread.php?threadid=47871

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default macros don't work

The first worked for me, but I may not have the same data as you.

You might want to try and bracket the tests to ensure you test as you
require, maybe

Sub Macro_ContractTermination()
Dim c As Range

For Each c In Range(ActiveCell, Cells(370, ActiveCell.Column))
If (c.Interior.ColorIndex = 15 Or _
c.Interior.ColorIndex < 0) And _
Len(c) = 0 And _
c.FormulaR1C1 = "" Then
c.Interior.ColorIndex = 56
End If

Next c

End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"alymcmorland"
wrote in message
news:alymcmorland.1xel6c_1130151908.6202@excelforu m-nospam.com...

Can anyone see anything wrong with this code, because when i try execute
each one nothing happens and its as if i haven't executed anything at
all!


Code:
--------------------

Sub Macro_ContractTermination()
Dim c As Range


For Each c In Range(ActiveCell, Cells(370, ActiveCell.Column))
If c.Interior.ColorIndex = 15 Or c.Interior.ColorIndex < 0 And Len(c) =

0 And c.FormulaR1C1 = "" Then
c.Interior.ColorIndex = 56
End If

Next c

End Sub


Sub Macro_ContractReinablation()
Dim c As Range


For Each c In Range(ActiveCell, Cells(370, ActiveCell.Column))
If c.Interior.ColorIndex = 56 Or c.Interior.ColorIndex < 0 And Len(c) =

0 And c.FormulaR1C1 = "" Then
c.Interior.ColorIndex = 15
End If

Next c

End Sub


Sub Macro_BankHoliday()
Dim c As Range


For Each c In Range(Cells(ActiveCell.Row, 4), Cells(ActiveCell.Row, 56))
If c.Interior.ColorIndex = 56 Or c.Interior.ColorIndex < 0 And Len(c) =

0 And c.FormulaR1C1 = "" Then
c.Interior.ColorIndex = 15
End If

Next c

End Sub


Sub Macro_WorkingDay()
Dim c As Range


For Each c In Range(Cells(ActiveCell.Row, 4), Cells(ActiveCell.Row, 56))
If c.Interior.ColorIndex = 15 Or c.Interior.ColorIndex < 0 And Len(c) =

0 And c.FormulaR1C1 = "" Then
c.Interior.ColorIndex = 56
End If

Next c

End Sub


--------------------


--
alymcmorland
------------------------------------------------------------------------
alymcmorland's Profile:

http://www.excelforum.com/member.php...o&userid=27652
View this thread: http://www.excelforum.com/showthread...hreadid=478716



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
Macros do not work anymore! fak119 Excel Discussion (Misc queries) 4 September 28th 09 05:54 PM
PC macros won't work on MAC Adam Excel Discussion (Misc queries) 2 April 21st 08 01:58 PM
Solver does not work from Macros mjd918 Setting up and Configuration of Excel 1 January 6th 06 04:15 PM
Macros Don't work anymore Krandall Excel Programming 3 September 14th 05 09:36 PM
Macros don't work on another PC Larry Graff[_2_] Excel Programming 3 November 3rd 04 10:53 PM


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