Re: Getting stock information using macros
Hi Roberto Heng ,
Nice to meet you.
QueryTables is catched by class event.
http://www.excelforum.com/exce…-refreshing-web-data.html
Regards, junho
Re: Getting stock information using macros
Hi Roberto Heng ,
Nice to meet you.
QueryTables is catched by class event.
http://www.excelforum.com/exce…-refreshing-web-data.html
Regards, junho
Re: Screen Capture of All User Forms on Project - Error Trying to Show the Forms
Hi jzaldivar,
Nice to meet you.
Have you checked "Microsoft Visual Basic for Aplplications Extensibility 5.3" reference from VBE Tools?
Regards, junho
Re: USD $75.00 Insert Rows Based on Criteria, Run Counter, Fill Down Empty Cells
Thank you Mark for payment.
Re: Check directory for files.
Hi major-b,
Nice to meet you.
http://www.ozgrid.com/forum/showthread.php?t=24586&page=1
[INDENT]Function FileExists(fname) As Boolean
' Returns TRUE if the file exists
Dim x As String
x = Dir(fname)
If x <> "" Then FileExists = True
Else FileExists = False
End Function [/INDENT]
Regards, junho
Re: USD $75.00 Insert Rows Based on Criteria, Run Counter, Fill Down Empty Cells
sure i will try.
Thanks.
Re: Insert Rows Based on Criteria, Run Counter, Fill Down Empty Cells - $75 for answe
Hi markw16,
Nice to meet you. Try this one.
Sub InsertRow()
Dim OneCol As Variant
Dim i As Long
Dim j As Long
OneCol = Range("A1:A" & Range("A65536").End(xlUp).Row)
For i = UBound(OneCol, 1) To 1 Step -1
If IsNumeric(OneCol(i, 1)) And OneCol(i, 1) = Int(OneCol(i, 1)) Then
Rows(i + 1 & ":" & i + OneCol(i, 1)).EntireRow.Insert
For j = 1 To OneCol(i, 1) + 1
Range("B" & i + j - 1) = j
Next
Range("C" & i, Range("IV" & i).End(xlToLeft)).Resize(OneCol(i, 1) + 1).Value = Range("C" & i, Range("IV" & i).End(xlToLeft)).Value
End If
Next
End Sub
Display More
Regards, junho
Re: Looking for a financial formula
Hi kbarron,
Nice to meet you.
=NPER(9%,,-1,1.875)
Regards, junho
Re: Change default chart colours using vba
Hi ecp98rjs,
Nice to meet you.
Would you look at linked below page?
http://www.worldstart.com/tips/tips.php/2134
Regards, junho
Re: Import web data in excel using vba
Your welcome and thank you.
ps: function borrowed from rondebruin.
Re: Import web data in excel using vba
Hi 1979aris,
Try this instead.
Sub Macro1()
'
' Macro1 Macro
'
x = 6
For x = 6 To 10
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www3.nowgoal.com/1x2/companyhistory.aspx?id=281&company=Bet 365&matchdate=2010-11-" & x _
, Destination:=Range("$A$" & RDB_Last(1, Cells) + 1))
.Name = "companyhistory.aspx?id=281&company=Bet 365&matchdate=2010-11-06"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = True
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Next x
End Sub
Function RDB_Last(choice As Integer, rng As Range)
'Ron de Bruin, 5 May 2008
' 1 = last row
' 2 = last column
' 3 = last cell
Dim lrw As Long
Dim lcol As Integer
Select Case choice
Case 1:
On Error Resume Next
RDB_Last = rng.Find(What:="*", _
after:=rng.Cells(1), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
Case 2:
On Error Resume Next
RDB_Last = rng.Find(What:="*", _
after:=rng.Cells(1), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Column
On Error GoTo 0
Case 3:
On Error Resume Next
lrw = rng.Find(What:="*", _
after:=rng.Cells(1), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
On Error Resume Next
lcol = rng.Find(What:="*", _
after:=rng.Cells(1), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Column
On Error GoTo 0
On Error Resume Next
RDB_Last = rng.Parent.Cells(lrw, lcol).Address(False, False)
If Err.Number > 0 Then
RDB_Last = rng.Cells(1).Address(False, False)
Err.Clear
End If
On Error GoTo 0
End Select
End Function
Display More
Regards, junho
Re: Summing by Comparing 2 Lists??
Hi Zergy,
Nice to meet you.
=SUMPRODUCT(--(Sheet2!$A$1:$A$150=Sheet1!A2),Sheet2!$B$1:$B$150)
Regards, junho
Re: VBA - Change bar chart color depending on name of data point (XValues)
Hi spokyboy,
Nice to meet you.
It's ideal to debug when macro isn't run as expected.
Or press F8 key then variable's value is displayed in locale window on vbe window for each step.
Regards, junho
Re: VBA code to identify certain cell in range, then perform goalseek changing that c
Hi Sacurus,
Nice to meet you.
'http://www.eggheadcafe.com/software/aspnet/33077454/worksheetfunctionmatch.aspx
' GoalSeekEPCMarginRequirement Macro
'
' Set Variables
Dim ActiveCase As Long
Dim EPCMargins As Range
Dim EPCMargin As Range
On Error Resume Next
ActiveCase = WorksheetFunction.Match(Range("ActiveCase"), Range("Scenarios"), 0)
If Err.Number <> 0 Then
MsgBox "Not found"
Err.Clear
Else
Set EPCMargins = Range("EPCMargins")
Set EPCMargin = EPCMargins(1, ActiveCase)
' Set XIRR Value for Goalseek to Owner ATIRR Hurdle
Range("TotalULXIRR").Value = Range("OwnerATIRRHurdle").Value
' Goalseek
Range("TotalULXNPV").GoalSeek Goal:=0, ChangingCell:=EPCMargin
End If
On Error GoTo 0
Display More
Regards, junho
Re: Save entire workbook as web page without interactivity but with autorepublish
Hi stevhill,
Nice to meet you.
I just link what I've found from microsoft support.
http://support.microsoft.com/kb/289262/en-us
Regards, junho
Re: to oz members
Thank you,Krishna.
Re: to oz menbers
Thank you AAE.
Thank you,Reafidy.
Re: to oz menbers
Thank you,Rob.
Re: Changing Color of Bars in Bar Graphs
Hi booo,
Nice to meet you.
Here's recorder write.
Sub Macro1()
'first select chart
'seriescollection(1).points(4)
With ActiveChart.SeriesCollection(1).Points(4)
With .Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
.Shadow = False
.InvertIfNegative = False
With .Interior
.ColorIndex = 6 'yellow
.Pattern = xlSolid
End With
End With
'ActiveChart.SeriesCollection(2)
With ActiveChart.SeriesCollection(2)
With .Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
.Shadow = False
.InvertIfNegative = False
With .Interior
.ColorIndex = 50 'green
.Pattern = xlSolid
End With
End With
End Sub
Display More
If you want retrive series values then,
Dim cht As Chart
'first chart in activesheet
Set cht = ActiveSheet.ChartObjects(1).Chart
Dim valsrs
Dim i As Long
'With cht.SeriesCollection(1)
With ActiveChart.SeriesCollection(1)
valsrs = .Values
End With
For i = 1 To UBound(valsrs)
Debug.Print valsrs(i)
Next
Display More
Regards, junho
Hello oz members,
Last month i received a message about giving me ozmvp.
So I embarassed, I wonder whether it is real or not.
But anyway thanks for all members on this forum.
Thanks.
Regards, junho