Solved

Formula Help

Posted on 2014-01-15
7
277 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

910 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

21 Experts available now in Live!

Get 1:1 Help Now