Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Disabling the "&[Time]" or "&[T]" in Excel headers and footers | Excel Discussion (Misc queries) | |||
Help for Excel time format "MACRO" | Excel Programming | |||
Excel 2003: Conditional Formatting using "MIN" & "MAX" function | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
excel - macro - automatic initiation of a macro at a pre-specified "system time" | Excel Programming |