Skip to content
WJunction - Webmaster Forum

Small Excel VBA Problem (ActiveCell.Value)

Status
Not open for further replies.
I seem to be having a small problem with Excel 2010.
This is an example of my code.

Code:
Dim InvoiceDate As String

InvoiceDate = InputBox("Please enter the Invoice Date in this format - DD/MM/YYYY")

Range("A1").Select
ActiveCell.Value = InvoiceDate

This would place the invoice date into A1 - Or whatever other value you wanted to use.
It has to be done this way - with a inputbox.

In Excel 2007, this works perfectly fine.
In Excel 2010, this doesn't seem to work?
No error codes are given, it runs through the macro fine... It's just when it hits the last line "ActiveCell.Value = InvoiceDate", it doesn't seem to put anything in A1 ?

Any ideas?
Thanks


---- EDIT ----

Ahhhh, I see the problem. As the code was quite large, I had to split the macro into a couple of subs. The code above was in the first sub, and the actual call was in the third.
Problem now solved.
Thanks anyway
 
Last edited:
Status
Not open for further replies.

About the author

A
Senior Member · Joined
1,242
Messages
304
Reactions
83
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom