LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Code to run Value of cell rather than the Formula

I am currently running this code in my worksheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B5")) Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False
Rows("12:61").Hidden = True
Rows(12 & ":" & Target.Value + 11).Hidden = False
endit:
Application.EnableEvents = True
End Sub

If i simply enter a number in B5, the code works wonderfully. The problem is
that the value entered in B5 is not simply a number, but a formula which
pulls data from another worksheet. How can i make this work with the value
of b5 rather than the formula in B5?

I am a n00b to this, and would appreciate any help in the right direction.

Thanks in advance.

--
Murphy's first law of combat: Incoming fire always has the right of way.
 
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
using code variable to write cell formula rpw Excel Programming 2 July 5th 06 06:56 PM
Code to Insert Formula in Cell Paige Excel Programming 4 May 2nd 05 04:32 PM
Help Converting Cell Formula To VBA Code Minitman[_4_] Excel Programming 5 November 4th 04 08:03 PM
Defining Cell Row Value Remotely in Formula not Code Danny[_6_] Excel Programming 1 May 1st 04 08:16 PM
Cell Formula to run VBA code zSplash Excel Programming 7 March 6th 04 12:51 AM


All times are GMT +1. The time now is 07:53 PM.

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"