Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 21st, 2009, 02:16 PM
Authorized User
 
Join Date: Apr 2009
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default If-Then VBA

I am a very beginner VBA user

If A1 is greater than or equal to B1, automatically put the value of A5 in C1 and then allow user input into cell C2 via perhaps a popup box or something similar

If A1 is less than B1, automatically put the value of A6 in C2 and then allow user input into C1 via perhaps a popup box or something similar


A1 and B1 will be user input.
if A1 and B1 are both filled then the analysis/program will begin

I have no idea how to accomplish this, any help would be great. thanks in advance
please help
 
Old April 21st, 2009, 02:47 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hello.. your pseudo-code is great, that's the way to resolve it.. what do you need?? code??? I don't think nobody will code for you.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old April 21st, 2009, 03:36 PM
Authorized User
 
Join Date: Apr 2009
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I can do it for a formula If-then, but I can't write it in code. I need some direction for code because the cell needs to be auto fill if a condition 'A" is met and if not, then user input. As you know, if it is in a formula and user types in that cell, the formula is lost.
that was my thoughts, any thought you might have would be greatly appreciated
 
Old April 21st, 2009, 06:14 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

If you want to use VBA, there are several (lots!) of faqs at google. Anyway, if you have the formula, why not just use it in another cell, block that cell and it use from there???
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA help davidbrooks Visual Basic 2008 Essentials 2 March 26th, 2008 07:25 PM
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
New to VBA. Please help me. rupen Access VBA 1 May 27th, 2005 07:54 AM
Excel VBA to SQL & back to VBA edesousa Excel VBA 1 June 1st, 2004 02:39 AM
VBA bjackman Access 1 January 7th, 2004 12:43 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.