Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Basic question

Sorry, I thought from your original posting that you had tried the event
route and wanted a different route. I think Jim has got you sorted now.

Regards

Bob

"hshayh0rn" wrote in message
...
From the last time I posted I found the on change event and thought that
might be the answer but the code Bob supplied does not work when I add it

to
the on change event.

"Jim Thomlinson" wrote:

That is an on demand macro that the user would have to run on their own.

You
could use the On Change event from Sheet 2 if you needed it to be

automatic.
--
HTH...

Jim Thomlinson


"hshayh0rn" wrote:

Thanks for the reply... So, would the user have to run the macro

manually or
does excel know to run this on its own?

"Bob Phillips" wrote:

Sub myMacro()
If Worksheet("Sheet2").cells(12,3) = "N" Then
Worksheet("Sheet3").cells(3,2) = "Sold Out"
ElseIf Worksheet("Sheet2").cells(12,3) = "Y" Then
Worksheet("Sheet3").Visible = False
End If
End Sub

This would be an on-demand macro, stored in a standard code module.

--

HTH

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


"hshayh0rn" wrote in message
...
I have a very basic question but I can't seem to find the answer

on here
(probably to basic). I have a spreadsheet that I would like to

perform all
of
my calculations / If / Then statements using VBA but I'm not sure

how to
actually get the code to run or where to put it to run... I can

get all of
the code to run with an on click event or something like that but
basically
I'd like cells to automatically fill in other cells based on

values the
users
put in them. For example:

If sheet2!.cells(12,3) = "N" Then

Sheet3!.cells(3,2) = "Sold Out"

or

If sheet2!.cells(12,3) = "Y" Then

Sheet3!.Visible = False

I'll keep searching for the answers to this question but if

someone could
shoot me a quick answer I would appreciate it.





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
basic question M121385 New Users to Excel 4 May 6th 08 06:22 PM
Basic question plittle Excel Discussion (Misc queries) 1 May 23rd 06 03:49 PM
BASIC VBA QUESTION MASON Excel Programming 1 December 26th 03 05:04 PM
Too Basic A Question dave Excel Programming 6 October 26th 03 03:57 PM
Basic VBA question Henrik[_2_] Excel Programming 2 October 25th 03 12:23 AM


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