Text in VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I'd like, if possible, in VBA to have an inputbox that will allow me to
write a text in J1 if B1 has value but J1 is empty.
Is that possible?
 
This inputbox should be invoked if J1 is empty and B1 has a value.
Thanks,
 
Hi
but THEN should this happen:
- do you want to click a button
- should it appear after entering something in B1
 
Hi,

Yes. I want to click on button and it should appear after entering something
in B1
Regards,
 
Hi
try the following macro (assign it to a button):
sub foo()
dim res
with activesheet
if .range("B1").value<>"" and .range("J1").value = "" then
res = inputbox("Enter data for J1")
.range("J1").value=res
end with
end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top