I received a suspicious email from <Excel Help/VBA Help: [forum@ozgrid.com]>. It may be nothing but I am wanting to inquiry about it's origin and content, how would I do this? I of course have received other emails from this site.
I have one spreadsheet with a list of materials by material number. I have another with all sales activity. How can I pull into the first spreadsheet the date of the latest activity from the second spreadsheet?
I have a very large spreadsheet with financial information I am trying to graph on a line graph (which I know how to do). I would like to take only the last 48 months of activity and graph that. Is there a formula I can use to select only the last 48 months without reselecting the data everytime?
Example (for simplicity purposes in this example I only want ten months of data
Jan Feb March April May June July Aug Sept Oct Nov Dec 10 12 14 10 9 12 11 12 12 10 9 13
I would like a graph that displays march-december sales figures.
I sit possible to run a macro that will record email activity from an Outlook inbox and store it in a Excel file. For example, the date received and the subject line for every email that comes into an inbox would be logged.
I have this table that I put together everyday describing the activity of my department. There is the date displayed as "Num-Date", the day of the week and multiple columns of data. Every day I have to add a new row and update the date, and the data, etc. I have a macro that inserts a new row and auto-updates the date and weekday, I also have a web query set up to fetch the data I want and display it right next to the table, but what I want to do is make the table more intuitive and automated.
I am recording attendance to our various activities as follows (screenshot):
Column A show the activity
Columns B onwards show attendance by day of the week (names gathered from list).
Now I've got a simple formula =COUNTA(Sep!B4:AE51) to count the total attendance for the month, modifying the range to cater for each activity, but it would be better if I could keep the range the same and modify the activity.
Also, I would like a formula to show the attendance at each activity by the day of the week (ie to show the total and average attendances for Mondays or Tuesday etc).
I have Activity data from my production line that details when a job is running "RUN" and when its on stop "SETUP". It looks like this:
Run 0.45 hrs (decimal hours) Setup 0.1 hrs Run 1.2 hrs Setup 0.2 hrs etc.
I want to be able to graphically present this against a fixed timeline, I have the timeline in a column, (not a row). I have cumulatively summed my times so I have this...
Run 0.45 hrs Setup 0.55 hrs Run 1.75 hrs Setup 1.95 hrs etc
However I want to be able to establish whether the job was ON RUN or SETUP at each interval of my timeline. For example: if my time line was in 0.01 decimal minute intervals, my chart would look like this:.................
I have a spreadsheet whereby process activities can be attributed to the different staff members who complete the activity. Each activity is on a different row and up to three staff can be assigned to each activity, so for example if a level one employee sorts the mail on four out of five days per week I would attribute 80% contribution to the task to the level one employee. If a supervisor sorts the mail on a Friday I would allocated a 20% contribution to that staff group.
My question is how do I prevent someone filling in the spreadsheet from allocating a combined contribution above 100% to any task. This could be for example either putting a number in greater than 100% into one of the allocation columns or a total across up to three different columns above 100%.
The columns where I assign the percentage contribution are E,H and K. I would like to generate an error which says something like 'Cumulative staff contribution per process activity cannot exceed 100%.
I need to show an information box e.g. "Initialising..." that I can show and remove without user interaction. I can't seem to find this using either a userform or msgbox.
Unfortunately, the formula above gives me the total number of activity and NOT the total number of hours within a specified period. I attached the file I'm working on as reference.
My question is about passing arguments to UserForm procedures. I've created a Main procedure. Main calls a sub procedure and returns an array. Obviously Main can now use the array. But then Main calls a sub procedure to open my userform.
All of my userform sub procedures need to use the array I created in Main. Do I have to pass the array into all of my userform procedures? Into the UserForm_Show procedure? And then again into UserForm_Initialize? And then again into ComboBox_Change? I don't understand how to give my UserForm procedures the array from my Main procedure.
MS Query can only hold 16 joins and some other restrictive requirements. Has utilized Stored Procedures to execute a query and have the results returned to Excel? Query in Excel seems very limited.
I have a workbook with no data sheets showing with all actions being taken by the use of Userforms.
To make the workbook look consistent I would like to use a Userform rather than the standard MsgBox, the problem I cant seem to work around is passing the result of a Command Button back to the original proceedure.
I am trying to work along the lines of this but I am not sure where I am going wrong.
This procedure would call the Userform and then provide the next action dependant on the users choice:
Public Sub Testing() Call TestMe If Ans = Yes Then Sheets("Sheet1").Range("A1").Value = "Yes" Exit Sub End If If Ans = No Then Sheets("Sheet1").Range("A1").Value = "No" Exit Sub End If If Ans = Cancel Then........................
Have a bit of code to list all procedures in project to a sheet. Idea from Chip Pearson, adapted with help from Norie. List procedures in module/project Reference is set to MS VBA Extensibility. Thought solved, but trying to use now only lists one procedure in the project Namely the procedure in the module identified here :
Set VBCodeMod = ThisWorkbook.VBProject.VBComponents("mdl_comp_pl_ProcedureList").CodeModule
I tried many variations by stopping at
Set VBCodeMod = ThisWorkbook.VBProject
But receive error message
Objest doesn't support property
Option Explicit
Sub raw_pl_ProcedureList() 'Uses reference to Microsoft VBA extensibility Dim VBCodeMod As CodeModule Dim StartLine As Long Dim Msg As String Dim ProcName As String Dim wbBook As Workbook Dim wsList As Worksheet Dim rngProcedure As Range Dim intCounter As Integer intCounter = 1 With Application .DisplayAlerts = False .Calculation = xlCalculationManual . ScreenUpdating = False.........................
I have a problem with the overreaction of my VBA function procedures. Basically, I have an input section with 1000 rows and 10 columns and an output section with 1000 rows and 40 columns. Each cell in the output section is with fomula:
I am running this code it is rather long, but I need to show it all ?
Code: Public Sub Monday() Dim mName() As Variant Dim lName() As Variant Dim fName As String
Call lower(CStr(mName(q)), fName, CStr(lName(q)))
[Code] .........
How to do is to pass the value of convert to the other procedures that are being called? As you can see I know how to pass variables down to "Sub-routines" but how would I pass the variable up?
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.
I am trying to determine if it's possible to control the order of like events. In other words, if I have set up two Worksheet_Change events, can I control which one fires first? Or, as a second best, can I determine which one will fire first?
I am using Office XP on Windows XP, but I'm looking for a generic solution if possible.
If I'm starting in Sub #1 and I have turned screenupdating off, then later in the procedure I call a function that also has screenupdating off (and also back on at the end of the function), will I get a slight flicker here? I'm noticing a slight one, and I can only imagine that it's where the screenupdating is being triggered again. (removing the updating from the function isn't an option, because another procedure calls the same function & needs it turned off)
I've searched the web and OzGrid all day, and still have this question: what is the equivalent for .OnAction when using a ComboBox as shown in the code below. Everything else works as desired.
I have a value in a cell named subNo. whatever that value is I want that routine to be called. How do I concatenate Sub & the number?
Sub WhichSub() Dim varSubNo As Integer Dim mysub As String varSubNo = Sheets("Main").Range("subNo").Value Call Sub & varsubNo 'how do I concatenate this? End Sub
When working in an userform, and you call another sub routine within the userform, will all variables passed automatically be byref (no way to do byval?)?