Search:
Type: Posts; User: DKenny
Search:
Search took 1.70 seconds.
-
Or you could just call the GoalSeek method of the target cell.
Excel Developer Reference
Range.GoalSeek Method
Calculates the values necessary to achieve a specific goal. If the goal is an...
-
Wow, this is a blast from the past!
I would suggest reversing the string, using the StrReverse function.
Then use the Find Fuction to locate the 'e' switch.
Take a sub-string of the string to...
-
Here's some code to copy a picture from the clipboard.
The Excel file shows this in action, by copying the chart as a picture and pasting it to the form.
Option Explicit
'Requires a reference...
-
Have a look at my post here on creating an event handler class in VBA
http://www.vbforums.com/showthread.php?p=2519617#post2519617
-
Have a look at my post here on creating an event handler in VBA. It will give you a good approxamation of a control array.
-
I assume you are talking about access?
Use the following SQL statement
UPDATE TABLE TableName SET b = right(a,16)
-
Replace these 2 lines
Workbooks("a.xls").Select
ActiveWorkbook.close
With this one line
Workbooks("a.xls").Close
-
Have you been able to determine which line in your code is causing the error?
-
Just convert both values to upper case before you compare them
If UCase(ActiveSheet.Cells(1, columnnum).Value) = UCase(Inputvalue) Then
-
Fleet
The answer is to not specify the version of Excel at all!
Have a search on this forum for posts about "Late Binding". There are multiple examples of how to make your application agnostic to...
-
I hate to say ity, but you may want to rethink your approach. This sounds like a situation that would be better handled by a database than by a spreadsheet.
-
OK, would the pivot table approach work? See attached...
-
If this is Excel, you don't need a procedure to achieve this. You have two options that both use native Excel functions.
1/ Create a Pivot Table
or
2/ Use the SUMIF function
If the list of...
-
As the datatype is numeric, you will need to remove the single quotes from the condition in the WHERE clause
SQL = "insert into [Tracking Archive] select * from [Tracking] where DischargeID = " &...
-
What is the datatype for the DischargeID filed?
-
SQL looks fine - assuming that
1/ the Tracking table contains a field called DischargeID
2/ the DisID is being correctly populated
On your additional comments to your previous post, it doesn't...
-
You are on the right track white using a WHERE in the INSERT INTO statement. Can you post the INSERT SQL for the transaction table?
-
Forget about the form and think about the underlying tables for a moment (there is no spoon).
There must be some FK relationship between the master table and the transaction table. If you can...
-
There is no need to autofilter to delete the rows.
Just loop through all rows, looking for the value 3 and delete based on that.
Sub BulletHeadDelete()
Dim rngColumn As Range
Dim lMaxRow As...
-
I think you've over-engineered it a tad.
Putting my formula "=NOW()-WEEKDAY(NOW(),2)+1" in A2 give the correct answer.
B2 then becomes =A2+1
C2 =B2+1
Etc
-
That's why I said to "Insert a new column" ;)
Glad you were able to get it resolved.
-
you need to run two SQL statements in sequence. One to insert the record into the history table, the second to delete from the active table.
Here's the sudo-SQL
SQL 1/
INSERT INTO...
-
For Monday use the following formula
=NOW()-WEEKDAY(NOW(),2)+1
For each day after Monday, increment the adder value at the end.
i.e Tuesday = "=NOW()-WEEKDAY(NOW(),2)+2"
-
Why not just use a vlookup formula on the worksheet to try to find matches?
Any value that doesn't have a match will return an #N/A error
-
Insert a new column and add the following formula in that column. This will trap the errors and treat them as zeros. You can then sum the results in that col.
=IF(ISERROR(A1),0,A1)
-
Try this - Basically it loops through the cells in a column, building an array of the used values and setting the colr based on the order of those used values.
Sub Dastard_Color()
Dim...
-
You will need to have your headers in Row 1.
-
Try this
Sub ChangeAllLinks()
Dim wkbLinked As Workbook
Dim fdNewPath As FileDialog
Dim sNewPath As String
Dim vLinks As Variant
Dim lLinkNum As Long
Dim sReversed As String
Dim sFileName As...
-
Here's the code to change all links in a workbook to a new path.
Option Explicit
Sub ChangeAllLinks()
Dim wkbLinked As Workbook
Dim fdNewPath As FileDialog
Dim sNewPath As String
Dim vLinks...
-
This is quick and dirty ( 'cause I 'm leaving for the Holidays) but it may help....
Sub testZaZa()
Dim rngZaZa As Range
Dim lAreaNum As Long
Dim lColNum As Long
Set rngZaZa =...
-
You need to look at the "Areas" collection of the Range object. This collection contains a group of ranges that constitutes the non connected ranges that make up the master range.
That is probably...
-
Joseph is right, you could use an IF statement in E4 that is dependant on D4
something like (in E4)
=IF(D4="Somevalue","new value","")
-
what value do you need to assign to what cell?
-
Not the version I've seen....
Excel 2007 Big Grid
-
-
There is no need to use VBA to achieve what you need. You can achieve all that you require using the SUM and COUNT excel worksheet functions.
Put the following formula into Cell B3 on Sheet1...
-
Humm, that code works fine for me...
If the NOW function works, can I suggest that you use it and format the textbox as a short date - that way you wont see the time element.
-
You need to specify the .value property of the textbox object.
Private Sub Command2_Click()
Me.Text0.Value = Date
End Sub
-
=SUM((F1:F65535="Pipe")*(C1:C65535="1CC")*(D1: D65535))
-
FontSize is a valid property, but only of the TextEffectFormat Object. Intelisence puts it in CamelCase because it recognizes it as a valid vba expression.
|
Click Here to Expand Forum to Full Width
|