Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
MC MC is offline
external usenet poster
 
Posts: 29
Default The use of VBA function "Time" in an Excel Macro

Hi,
I've been using a Macro in Excel to calculate certain averages that uses the
function "Time" from VBA libraries. When trying to run the same Macro in
another computer with the same version of Excel (Excel 2003 (11.5612.5606)),
I get the compile error messasge: "Can't find project or library" and
highlights the term "Time". It looks as if that function "Time" is in a
library that this version of excel has no access to. Is there anyway to
"solve" this?
Thanks for any suggestion,
MC
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 419
Default The use of VBA function "Time" in an Excel Macro

MC,

Check the Add-Ins in XL on your computer and make sure the troublesome
computer has the same add-ins enabled.

HTH,

Conan Kelly




"MC" wrote in message
...
Hi,
I've been using a Macro in Excel to calculate certain averages that uses
the
function "Time" from VBA libraries. When trying to run the same Macro in
another computer with the same version of Excel (Excel 2003
(11.5612.5606)),
I get the compile error messasge: "Can't find project or library" and
highlights the term "Time". It looks as if that function "Time" is in a
library that this version of excel has no access to. Is there anyway to
"solve" this?
Thanks for any suggestion,
MC



  #3   Report Post  
Posted to microsoft.public.excel.programming
MC MC is offline
external usenet poster
 
Posts: 29
Default The use of VBA function "Time" in an Excel Macro

Thanks Conan,
will check ... any suggestion as to which add-in would include such "Time"
function frm VBA???
thanks
MC

"Conan Kelly" wrote:

MC,

Check the Add-Ins in XL on your computer and make sure the troublesome
computer has the same add-ins enabled.

HTH,

Conan Kelly




"MC" wrote in message
...
Hi,
I've been using a Macro in Excel to calculate certain averages that uses
the
function "Time" from VBA libraries. When trying to run the same Macro in
another computer with the same version of Excel (Excel 2003
(11.5612.5606)),
I get the compile error messasge: "Can't find project or library" and
highlights the term "Time". It looks as if that function "Time" is in a
library that this version of excel has no access to. Is there anyway to
"solve" this?
Thanks for any suggestion,
MC




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 419
Default The use of VBA function "Time" in an Excel Macro

MC,

I don't know much about the add-ins that come with XL, but looking at my
list, there are 2 with VBA in the title: Analysis ToolPak - VBA and
Internet Assistant VBA.

Just geussing, but I don't think Internet Assistant VBA would have it.

Do you have either of those 2 add-ins enabled on your computer? Does the
problematic computer have them enabled?

If they are not listed, they will probably need to be installed.

HTH,

Conan




"MC" wrote in message
...
Thanks Conan,
will check ... any suggestion as to which add-in would include such "Time"
function frm VBA???
thanks
MC

"Conan Kelly" wrote:

MC,

Check the Add-Ins in XL on your computer and make sure the troublesome
computer has the same add-ins enabled.

HTH,

Conan Kelly




"MC" wrote in message
...
Hi,
I've been using a Macro in Excel to calculate certain averages that
uses
the
function "Time" from VBA libraries. When trying to run the same Macro
in
another computer with the same version of Excel (Excel 2003
(11.5612.5606)),
I get the compile error messasge: "Can't find project or library" and
highlights the term "Time". It looks as if that function "Time" is in
a
library that this version of excel has no access to. Is there anyway
to
"solve" this?
Thanks for any suggestion,
MC






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default The use of VBA function "Time" in an Excel Macro


Check in the VB Editor Tools menu - References, uncheck any that are
marked missing. Then try again


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=93967



  #6   Report Post  
Posted to microsoft.public.excel.programming
MC MC is offline
external usenet poster
 
Posts: 29
Default The use of VBA function "Time" in an Excel Macro

Hi Conan, thanks for your suggestion but I have both the analysis toolpak and
analysis toolpak - VBA add-ins installed and I'm still getting the same error
which also comes out with the function format() of VB.

I avoided the use of the time function substituting this

= Format(Time, "hh:mm:ss AMPM")

by this:

With .Cells(1, 5)
.Formula = "=now()"
.NumberFormat = "hh:mm:ss;@"
End With

but then I'm getting the same error with the use of format in this function
(thisone I don't know how to avoid...)

Public Function F(r As Variant, i As Integer) As Variant
r = Value(r, (DemB))
If i = 4 Then
F = Format(r, "###0.0000")
Else: F = Format(r, "###0.00")
End If
End Function

I also checked in the folder "program files\common files\Microsoft
shared\VBA\VBA6" and there are a bunch of DLLs, apparently no one has the
functions mentioned above or Excel isn't getting access to them...


"Conan Kelly" wrote:

MC,

I don't know much about the add-ins that come with XL, but looking at my
list, there are 2 with VBA in the title: Analysis ToolPak - VBA and
Internet Assistant VBA.

Just geussing, but I don't think Internet Assistant VBA would have it.

Do you have either of those 2 add-ins enabled on your computer? Does the
problematic computer have them enabled?

If they are not listed, they will probably need to be installed.

HTH,

Conan




"MC" wrote in message
...
Thanks Conan,
will check ... any suggestion as to which add-in would include such "Time"
function frm VBA???
thanks
MC

"Conan Kelly" wrote:

MC,

Check the Add-Ins in XL on your computer and make sure the troublesome
computer has the same add-ins enabled.

HTH,

Conan Kelly




"MC" wrote in message
...
Hi,
I've been using a Macro in Excel to calculate certain averages that
uses
the
function "Time" from VBA libraries. When trying to run the same Macro
in
another computer with the same version of Excel (Excel 2003
(11.5612.5606)),
I get the compile error messasge: "Can't find project or library" and
highlights the term "Time". It looks as if that function "Time" is in
a
library that this version of excel has no access to. Is there anyway
to
"solve" this?
Thanks for any suggestion,
MC






  #7   Report Post  
Posted to microsoft.public.excel.programming
MC MC is offline
external usenet poster
 
Posts: 29
Default The use of VBA function "Time" in an Excel Macro

Thanks royUK, I tried to follow your sugg but the option Reference in VB
Editor Tools Menu appears disabled. No idea why...


"royUK" wrote:


Check in the VB Editor Tools menu - References, uncheck any that are
marked missing. Then try again


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=93967


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default The use of VBA function "Time" in an Excel Macro


The References option should display a list of References to select or
deselect. It should be availble for the active workbook. make sure that
you have the workbook selected in the Projects window of the VB Editor.


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=93967

  #9   Report Post  
Posted to microsoft.public.excel.programming
MC MC is offline
external usenet poster
 
Posts: 29
Default The use of VBA function "Time" in an Excel Macro

Thanks royUK, this seems to work, I'm no longer getting any compile error,
thanks!!

"royUK" wrote:


The References option should display a list of References to select or
deselect. It should be availble for the active workbook. make sure that
you have the workbook selected in the Projects window of the VB Editor.


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=93967


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default The use of VBA function "Time" in an Excel Macro


Glad that helped, it is often helpfull to see the file - you might like
to cosider the information bellow

HOW TO GET FURTHER HELP WITH A WORKBOOK
For further help with it why not join our forums (shown in
the link below) it's completely free, if you do join you will have the
opportunity to add attachmnets to your posts so you can add workbooks to
better illustrate your problems and get help directly with them. Also if
you do join please post in this thread (link found below) so that people
who have been following or helping with this query can continue to do
so. :)


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=93967

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling the "&[Time]" or "&[T]" in Excel headers and footers John Mirabella Excel Discussion (Misc queries) 2 January 15th 10 02:54 PM
Help for Excel time format "MACRO" vijay[_3_] Excel Programming 4 December 6th 08 01:25 PM
Excel 2003: Conditional Formatting using "MIN" & "MAX" function MMangen Excel Discussion (Misc queries) 2 September 16th 08 07:13 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
excel - macro - automatic initiation of a macro at a pre-specified "system time" arunjoshi[_3_] Excel Programming 3 May 1st 04 09:42 AM


All times are GMT +1. The time now is 07:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"