Excel 2000 :: Macro Calling Unrelated Function?
Jun 9, 2014
the macro works fine until it executes the paste values. At that point, the macro jumps to the "CountThem" function which is located in another workbook. The data that I am copy/pasting is in no way connected to any cells that are using that function. Although, other values in the workbook are passed down from data that uses that function.
I am still in the dark ages using Excel 2000.
This is the code for my macro.
Code:
Sub Current_to_Raw()
'
' Current_to_Raw Macro
' Macro recorded 2/12/2014 by
'
'
Range("N14").Select
[code]....
View 2 Replies
ADVERTISEMENT
Jun 1, 2009
I've developed a workbook with macros in Excel 2007 (Compatibility
Mode), Windows Vista Operating System. The purpose of the Macos
is to allow auto complete on a validated data entry field.
The macros run fine on this platform. I then copied the workbook
to my desktop, Excel 2000, Windows 2000 Professional Operating
System. One of the macros is killing Excel on this platform.
View 14 Replies
View Related
Jul 23, 2013
I have a function
VB:
Function f1(Matrix As Range)
'Does something and returns f1 = a double
End Function
And a second function which defines and constructs a matrix of doubles to use as an argument in f1 to return a double:
VB:
Function f2(dD As Double)
Dim MatrixRed() As Double
Redim MatrixRed(1 To dD, 1 To 10)
For i = 1 To dD
For j = 1 To 10
MatrixRed(i, j) = i * j
Next
Next
f2 = f1(MatrixRed)
End Function
I get an output error (#VALUE). I think it has something to do with MatrixRed not being a range anymore?
View 2 Replies
View Related
May 1, 2007
I guess I just don't understand the basics of calling a function. I have the following function in a standard module:
Function CleanUp(ws As Worksheets)
ws. Range("A2:P100").ClearContents
End Function
I have this code in a worksheet module:
Sub Trying_to_call_a_function()
CleanUp (ThisWorkbook.Worksheets("Month End"))
End Sub
But when I run the routine that calls the "CleanUp" function, I get the message: "Object doesn't support this property or method." I have tried changing the Function to this: CleanUp (ws as Worksheet) [instead of (ws as WorksheetS)]. Yet, this does not change anything.
View 3 Replies
View Related
Feb 2, 2010
I need to extract the filename “My Excel File” from Worksheets(“Sheet1”).Range(“A1”), whose value = C:Documents and Settingsuser1DesktopMy Excel File
I found on Chip Pearson’s site a Function TrimToChar which, using SearchFromRight and a TrimChar of “” will trim OFF the filename “My Excel File”, leaving the Path.
But, I think I could use his function to tell me the number of characters in the Path and then use that to extract the remaining characters from the total character length (Mid Function)
Problem is, I don’t have a clue how to call a Function in VBA to work on Worksheets(“Sheet1”).Range(“A1”). How do you set the InputText , TrimChar, & SearchFromRight?????
(eventually, this will be in a loop, where I extract the filename from a Dynamic Named Range (list) in Column A)
View 3 Replies
View Related
Sep 9, 2009
I have created a custom Function in excel. I would like to create a custom button so I can run this funtion with a Click of a button unstead of typing it in or clicking on the insert function button. I am not sure if this is possible to have VB call a custom function. Below is my VB for the Custom Function. I basically want the custom button to open the formula in excel.
Public Function CreateFlexstring(Company As String, Cost_Center As String, _
Division As String, Geography As String)
CreateFlexstring = Company & "-" & Cost_Center & "-" & Division & "-" & Geography
End Function
View 9 Replies
View Related
May 19, 2009
I have an add-in that has one function in it. We plan on adding more, but not until we figure out what's happening. The one function is a Select- Case statement...send the function an alpha code and it returns a numeric account number based on the alpha. About 20 "cases" in total. The add-in loads fine and the function works fine from a spreadsheet cell. However, we're getting differing results when we try to access the function from VBA code. I've been able to duplicate this several times on three different computers on our network.
The VBA code will work fine, several times and then on the 4th or 5th attempt it will cause Excel to crash ==> "Microsoft Office Excel has encountered a problem and needs to close. We are sorry for the inconvenience." If I " recover" the crashed file, comment out the line to call the function, run the program again it works. Then I can un-comment the line, re-run the program and it works fine again for 4 or 5 more attempts. I've tried running the Repair tool already. I've also copied the code out of the spreadsheet and started a new file. The same errors occur...works 4 or 5 times and then crashes the program. The add-in and the spreadsheet exists on networked drives.
View 3 Replies
View Related
Sep 26, 2007
I have a User Defined Function (for finding the next minimum value in a range) that is not working for nonconcurrent ranges when called from within a worksheet. It returns #VALUE!
This works: =nextmin(A11:A17)
This does not work: =nextmin(D13,E13,F13,F16)
However calling the function from within vba works:
View 9 Replies
View Related
Jul 23, 2014
how to properly write this kind of commands!
v_1 = Sheets("WB_Input").Cells(i, 2) 'It's gonna be a numeric value like 10
v_2 = "E"
v_3 = Sheets("WB_Input").Cells(i, j) 'It's gonna be a numeric value like 12
Sheets("WB_Output").Cells(i, j) = "=CONCATENATE(" & v_1 & "," & v_2 & "," & v_3 & ")"
Thing is once I look at the WB_Output Sheet what I see is an error and the cell shows this: =Concatenate(10,E,12)
So logically the problem is that I need to make it show up as =Concatenate("10","E","12")
Btw, I can't just put v_1 & v_2 & v_3, cause Excel understands "E" as exponential!
View 1 Replies
View Related
Apr 30, 2007
Is it possible to use the Worksheet_Change command to monitor 2 different cells in the same worksheet and call a different procedure depending on which cell is changed. i.e. if cell A1 is changed do this, if cell a2 is changed do that
View 9 Replies
View Related
Nov 25, 2009
I am trying to combine two worksheets into one worksheet. In the first worksheet I have countries in the first column. In the second column, I have the statistics for how many people belong to a certain religion. Then in the second worksheet, I have the countries in the first column and birthrate in the second column. How do I combine this information into one table in a third worksheet?
View 3 Replies
View Related
Apr 20, 2014
Here is what I am trying to accomplish - note that I need the formula to exist in an unrelated cell - in this example I use A6
Cell A1 is a drop down with "Proposed" and "Actual" as the choices.
Cell A2 allows user input ("Proposed") until the "Actual" value is known.
The "Actual" value is pulled from a different workbook (Workbook2).
The "Proposed" number can change many times before the "Actual" number is pulled in...this means that I cannot place the formula into A1 as it will be overwritten when the user puts in their "Proposed" number.
I would like to place the formula into an unrelated cell to continue to allow A1 to be user edited.
Formula would reside in A6 and the statement I am trying to execute would be something like:
If(A1="Actual", A2=Workbook2.xlsx]Actual!A2)
I have tried the formula in it's simplest structure to confirm it works before I reference workbook2 but it doesn't seem to work (formula resides in A6): =IF(A1="Actual",A2="hello"). I just get a "FALSE" result in A6. If I remove the = before IF excel does not recognize the statement as a formula.
View 1 Replies
View Related
Dec 16, 2008
I have been asked to create a spreadsheet that will contain three fields;
Date of placement (the day the person arrived)
Date of release (the above + 60 days)
Billable days for the current month
The first is simple, the clerk will enter the current date when the person arrives.
For the second field I am using:: =SUM(H5+(60),) (H5 is todays date, and will display the results in I5). When H5 is blank, I get the " #VALUE!" error in I5? Is there a more effective function to use?
For billable days, I am using; =SUM(J2 - (H5),) (J2 is simply the last date of the month; 12/31/09, and H5 is the placement date). I want to show the number of billable days in the current month. This will be repeated on 12 sheets (one for each month).
View 10 Replies
View Related
Dec 27, 2011
color tabs for Excel 2000 add-on
Any freeware (or shareware if necessary) program that will allow you to change tab colors on spreadsheets in Excel 2000. Later versions do have that ability built in, but 2000 does not.
View 1 Replies
View Related
Apr 26, 2014
I am creating a chart with more than 2000 dates (each day). How can I format the axis so it only displays the 1st day of each quarter (01/01/2010, 01/04/2010, 01/07/2010...).
At the moment I cannot format the axis and minor/major units remain numbers.
I am using Excel 2010 and European date format.
View 2 Replies
View Related
Aug 28, 2013
I record all jobs that come into my department. Column A contains the Job reference. Column B Contains the date that the job arrived and Column C contains the date that the job was complete.
The job can be split into several sections and can arrive on different days and the sections can be completed in different days.
I am looking to create a table that will show how long the complete job took to complete, so I am looking for the earliest date and the latest date for specific job reference numbers.
An example of my data is:
Column A Column B Column C
Ref No Date In Date Out
2013-0055 01/03/2013 25/03/2013
2013-0061 01/03/2013 03/03/2013
2013-0061 02/03/2013 20/03/2013
2013-0055 07/03/2013 28/03/2013
2013-0061 08/03/2013 19/03/2013
From the above data I am looking to create a table that will show
Ref No First Date Last Date Number of Days
2013-0055 01/03/2013 28/03/2013 28
2013-0061 01/03/2013 20/03/2013 20
I am using Excel 2000.
View 4 Replies
View Related
May 14, 2014
I have a web service URL from vendor, i need to call the particular method in that web service and pass parameters to method from VBA excel. In C# its working fine.Same method like i need to do from from Excel VBA. My doubt is how to form authenticate xml and how to call a particular method using soap action URL.
View 1 Replies
View Related
Mar 15, 2007
I convert text file into Excel. Then what I want is to look in column C for cell value “UNT:” (it is chopped word account: ) and copy value what is in the same row next column D into column K.
Then in column K copy down the value until next not empty cell.
My problem is that it works on Excel 97 and 200 but 2003 doesn’t work.
View 9 Replies
View Related
Apr 25, 2008
I have constructed a macro, (with lots of help from the fine people on this site), and have distributed it to several people in the company. The macro was written in Excel 2003, and runs perfectly on all the machines running Excel 2003, but persons using Excel 2000 are getting a runtime error, variable not defined.
Is there a trick to getting a macro to run in both versions of Excel?
View 9 Replies
View Related
Feb 18, 2008
I have a macro which is able to run very fast in Excel 2000. Almost 5s. When i run it in Excel 2003, it takes almost 4 to 5 mins to complete. Is there any patch in 2003 i need to run the macro smoothly?
View 4 Replies
View Related
Jul 8, 2012
I have a single spreadsheet that I save as multiple web pages [the sort and total options differ].
Is there an easy way to include a javascript snippet in the saved page without having Excel mangle the code by &ing the "<" and so on?
Excel 2000 on XP
View 1 Replies
View Related
Jul 18, 2008
I am using the following
xlrng.cells(5,1).resize(5,5) = myarray
If my array contains a text column with any text cell element > 900 bytes
office 2003 and greater blow up
in office 2000 it automatically truncates it without blowing up
if i write my own load loop, and load each cell individually
it works great no-poroblemo, its just extremely slow!
Is there any magic way to get this working correctly without truncation
and without blowing up?
View 9 Replies
View Related
May 3, 2013
I have a procedure in Access, MySub, stored in Module1.
To call it from Excel, I use the following:
Code:
Dim AccessApp As Access.Application
Set AccessApp = New Access.Application
With AccessApp
.OpenCurrentDatabase Filepath:="C:My location", Exclusive:=True
.Run Procedure:="MySub"
End With
Supposing for argument sake, there is another procedure also called MySub saved in Module2 in Access.
The above code will no longer work as it won't know which MySub to call.
How can I specify the correct one to choose? Of course I can rename the procedure in Module2 to something else.
View 4 Replies
View Related
Feb 12, 2009
I have created an XLA using a blank workbook which has a macro (called CompareMan) I have written within it.
I have written a utility (called INSTALLMAN) to install this add in.
When I run the install it creates and activates the add in OK.
The install also creates a toolbar with a button to trigger the macro.
Problem is, when I click the newly created button, no matter which workbook I am currently in I get a message ...
"The macro INSTALLMAN.xls!CompareMan cannot be found".
So my question is, how do I get my button to trigger the macro in my add in?
View 14 Replies
View Related
Aug 4, 2006
I am trying to call another macro, but instead of using the name of the macro, I have it in a variable. I am getting an error that says "Compile Error: Expected sub, Function, or Property." Can you call a macro that is in a variable? I basically have a bunch of macros created. I also have a list of the name of those macros on a worksheet in Excel. I want excel to start at the top of the list in excel and run the macro, then move down and run the next macro, and so on. Below is my code.
Sub Commercial_2005()
Dim Macroname As String
Workbooks("bleeg.xls").Activate
Worksheets("CommercialList").Select
Cells.Range("a1").Select
While ActiveCell.Value <> ""
Macroname = ActiveCell.Value
Workbooks("copy of recast_Report_v2.xls").Activate
Call Macroname
Workbooks("bleeg.xls").Activate
Worksheets("CommercialList").Select
ActiveCell.Offset(1, 0).Select
Wend
End Sub
View 3 Replies
View Related
Aug 15, 2013
Currently I'm using excel 2000. Can't hide hidden column when save as webpage?
View 2 Replies
View Related
Jun 29, 2006
I'm trying to run a macro on my machine (Windows 2000 and Office 2003) and I keep getting an error on one method. Now I tried to run the same macro on a different machine (Windows XP and Office 2003) and it didn't error out.
Public strControlTitle As String
Public strControlTime As String
Public strControlUnit As String
Public intControlItem As Integer
Public intLastNameOnly As Integer
Public intDataType As Integer
Sub Main()
Dim strControlItem, strPageName, strValue, sigma, z95, z99 As String
Dim r, c, count, cmax, rmax, rt, ct, low, high, a, b As Integer
Dim lesscol As Integer
With ControlChartForm
.ComboBox1.AddItem ("Average Turn Around Time All Patients")....................
View 4 Replies
View Related
Nov 14, 2006
I have a set of eight files, each of which is refreshed daily through a macro. I wanted to set up a master macro in a separate file that would open up each of the eight in turn, calls its refresh macro (which saves and closes the workbook), and then open up the next one, etc. I've searched the board and Help on this subject, but I keep getting an error:
Sub UpdateCSHoldReports()
' A sub to update all the US CS Hold Reports
' First, change the directory to the one that holds the files
ChDir "s:Marketing_ReportsCustomer Service2006CS Hold ReportsUSA"
' Next, open each file in turn, and run its refresh macro
' The refresh macro saves and closes the file automatically
Workbooks.Open ("VERIFICATION HOLDS 1000 PLUS.xls")
Workbooks("VERIFICATION HOLDS 1000 PLUS.xls").Activate
ActiveWorkbook.Sheets(1).Activate
Application.Run ("VERIFICATION HOLDS 1000 PLUS.xls!V1000Refresh")
End Sub
I'm only working on one file right now; I'll add the others when I get this one going. The error message I get is "1004" "The macro VERIFICATION HOLDS 1000 PLUS.xls!V1000Refresh cannot be found." It occurs when the Application.Run statement attempts to execute.
What obvious thing am I missing here? I have checked all the spellings, etc., so it's not something like that.
View 9 Replies
View Related
Nov 19, 2009
I'm writing some code in a "control" Excel file that will open a series of other files and successively run some processes. Each of these files has its own unique "refresh" macros, with parameters that vary from file to file.
How do I put code in my "control" file that will, when it opens each of these other files, run the "refresh" macro that is contained within them, and not the "control" file itself?
View 9 Replies
View Related
Nov 26, 2009
I have been combining multiple macro's into one large Macro and after research, it seems that only the call function works without any hitches.
Is there a way to use the call feature in one workbook while the macro's themselves, 5 or 6 of them, are in another workbook that is closed?
All users would have access to both workbooks.
The reason I am trying this is because I do not want all the other users to have to choose between multiple macro's and some of my colleagues like to use a radio button to link to the workbook. so it needs to have one file in it...
View 9 Replies
View Related