Solved

Formula Help

Posted on 2014-01-15
7
279 Views
Last Modified: 2014-01-17
Hello, tyring to get some data to appear on a page.  Here is the formula i have in a vba code need some help fixing it.  Thank You

Sheet18.textbox270.Value = "Current As Of:" & Format(Date, "yyyy-mm-dd hh:MM:ss")
0
Comment
Question by:sandramac
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 12

Expert Comment

by:tel2
ID: 39784337
What does your current code produce, exactly, Sandra?
0
 

Author Comment

by:sandramac
ID: 39784352
I get a method or data member not found.
0
 
LVL 3

Expert Comment

by:Sreeram
ID: 39784651
Are you trying to display the value in a text box control or in a cell.?

Try this:

For cell :

  Activecell.value=Format(Date, "yyyy-mm-dd hh:MM:ss")

Note: you need to format the cell as per your requirement . By right clicking and select formt cells

For Control:
the control name will be unique for the whole work book

textbox270=Format(Date, "yyyy-mm-dd hh:MM:ss")
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 12

Expert Comment

by:tel2
ID: 39786926
Hi kujumbio,

> For cell :
>  Activecell.value=Format(Date, "yyyy-mm-dd hh:MM:ss")
> Note: you need to format the cell as per your requirement . By right clicking and select formt cells

Is there any point in using the Format() function to format data in a cell which is already formatted appropriately?
Why don't we just format the cell (manually, as you suggested), then use a formula like this:
    Activecell.value=Date
0
 
LVL 3

Expert Comment

by:Sreeram
ID: 39787612
Hi tel2

       If you use only date it will be based on the regional setting of the system . what i made is double check for the format.
0
 
LVL 42

Accepted Solution

by:
Rob Jurd, EE MVE earned 500 total points
ID: 39787716
I tried your code and Date only returns the day/month/year component and not the time.  You should use Now with parenthesis eg Now() as it is calling a function returning a value

Sheet18.textbox270.Value = "Current As Of:" & Format(Now(), "yyyy-mm-dd hh:MM:ss")

I've tested with an ActiveX textbox that it looks like you're using.
0
 

Author Closing Comment

by:sandramac
ID: 39790077
Thanks
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now