Macro help.?

sezuh

Well-known Member
Joined
Nov 19, 2010
Messages
708
HI,
I found this VB code in Mrexcel archive and written by "PGC01"
its wounderful and fast but i have "Runtime error 1004" or error 400
"Method Range of object_Global failed", and it Highlight this line
when it reaches to the last row.
HTML:
Range("C" & lRow).Resize(, p) = vresult
is it possible to amend the code so it can continue on the next column.
This is the code;
Code:
[COLOR=black][FONT=Courier New]Sub [/FONT][/COLOR][B][COLOR=red][FONT=Courier New]Combinations[/FONT][/COLOR][/B][COLOR=black][FONT=Courier New]()<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]Dim rRng As Range, p As Integer<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]Dim vElements, lRow As Long, vresult As Variant<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]<o:p> </o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]Set rRng = Range("A1", Range("A1").End(xlDown)) ' The set of numbers <o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]p = Range("B1").Value ' How many are picked <o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]<o:p> </o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]vElements = Application.Index(Application.Transpose(rRng), 1, 0)<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]ReDim vresult(1 To p)<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]Columns("C").Resize(, p + 1).Clear<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]Call CombinationsNP(vElements, p, vresult, lRow, 1, 1)<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]End Sub<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]<o:p> </o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]Sub CombinationsNP(vElements As Variant, p As Integer, vresult As Variant, lRow As Long, iElement As Integer, iIndex As Integer)<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]Dim i As Integer<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]<o:p> </o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]For i = iElement To UBound(vElements)<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]    vresult(iIndex) = vElements(i)<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]    If iIndex = p Then<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]        lRow = lRow + 1<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]        Range("C" & lRow).Resize(, p) = vresult<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]    Else<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]        Call CombinationsNP(vElements, p, vresult, lRow, i + 1, iIndex + 1)<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]    End If<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]Next i<o:p></o:p>[/FONT][/COLOR]

[COLOR=black][FONT=Times New Roman]End Sub[/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman][/FONT][/COLOR]
<TABLE style="PADDING-RIGHT: 2pt; PADDING-LEFT: 2pt; FONT-SIZE: 11pt; FONT-FAMILY: Calibri,Arial; BACKGROUND-COLOR: #ffffff" cellSpacing=0 cellPadding=0 border=1><TBODY><TR style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center"><TD> </TD><TD>A</TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">1</TD><TD style="FONT-SIZE: 10pt; FONT-FAMILY: Arial Unicode MS">1 2 3 4 15</TD><TD style="TEXT-ALIGN: right">3</TD><TD>1 2 3 4 15</TD><TD>1 2 3 5 10</TD><TD>1 2 3 6 8</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">2</TD><TD style="FONT-SIZE: 10pt; FONT-FAMILY: Arial Unicode MS">1 2 3 5 10</TD><TD> </TD><TD>1 2 3 4 15</TD><TD>1 2 3 5 10</TD><TD>1 2 3 7 12</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">3</TD><TD style="FONT-SIZE: 10pt; FONT-FAMILY: Arial Unicode MS">1 2 3 6 8</TD><TD> </TD><TD>1 2 3 4 15</TD><TD>1 2 3 5 10</TD><TD>1 2 3 9 14</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">4</TD><TD style="FONT-SIZE: 10pt; FONT-FAMILY: Arial Unicode MS">1 2 3 7 12</TD><TD> </TD><TD>1 2 3 4 15</TD><TD>1 2 3 5 10</TD><TD>1 2 3 11 13</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">5</TD><TD style="FONT-SIZE: 10pt; FONT-FAMILY: Arial Unicode MS">1 2 3 9 14</TD><TD> </TD><TD>1 2 3 4 15</TD><TD>1 2 3 5 10</TD><TD>1 2 4 5 11</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">6</TD><TD style="FONT-SIZE: 10pt; FONT-FAMILY: Arial Unicode MS">1 2 3 11 13</TD><TD> </TD><TD>1 2 3 4 15</TD><TD>1 2 3 5 10</TD><TD>1 2 4 6 13</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">7</TD><TD style="FONT-SIZE: 10pt; FONT-FAMILY: Arial Unicode MS">1 2 4 5 11</TD><TD> </TD><TD>1 2 3 4 15</TD><TD>1 2 3 5 10</TD><TD>1 2 4 7 14</TD></TR></TBODY></TABLE>
thanks for any assistance
Sezuh
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi, i found this when i googeled but i don't know how or where to insert it
in cv code ,would you please help me on this.
Re: Vba Code To Move To Next Column <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
http://www.ozgrid.com/forum/showthread.php?t=67859&page=1

HTML:
cells(selection.row, columns.Count).end(xltoleft).offset(,1).select

thank you.
sezuh
 
Upvote 0
Select cell A1 below
Excel Workbook
ABCDE
1123234345456567
Sheet1
Excel 2007

Now run the code:

Code:
Sub Foo()
Cells(Selection.Row, Columns.Count).End(xlToLeft).Offset(, 1).Select
End Sub

Activecell should now be F1.
 
Upvote 0
Hi Jim,thanks for your response but it did not work unless i'm not doing it
properly .
what i’m doing is running macro to get
Result of Combin(495,3) =20092215 combinations,what i need is when it comes to the last row(1048576) to continue on column “F” or “G” without stopping until finish all combination,
Is that possible?
<TABLE class=MsoNormalTable style="BACKGROUND: white; mso-cellspacing: 0cm; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 2.0pt 0cm 2.0pt" cellSpacing=0 cellPadding=0 border=1><TBODY><TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes"><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; BACKGROUND: #cacaca; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed"></TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; BACKGROUND: #cacaca; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed">
A<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; BACKGROUND: #cacaca; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed">
B<o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; BACKGROUND: #cacaca; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed">
C<o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; BACKGROUND: #cacaca; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed">
D<o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; BACKGROUND: #cacaca; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed">
E<o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; BACKGROUND: #cacaca; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed">
F<o:p></o:p>
</TD></TR><TR style="HEIGHT: 14.25pt; mso-yfti-irow: 1"><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; BACKGROUND: #cacaca; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 14.25pt">
1<o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 14.25pt; BACKGROUND-COLOR: transparent">01 02 03 04 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 14.25pt; BACKGROUND-COLOR: transparent">
3<o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 14.25pt; BACKGROUND-COLOR: transparent">01 02 03 04 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 14.25pt; BACKGROUND-COLOR: transparent">01 02 03 05 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 14.25pt; BACKGROUND-COLOR: transparent">01 02 03 06 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 14.25pt; BACKGROUND-COLOR: transparent"></TD></TR><TR style="HEIGHT: 13.5pt; mso-yfti-irow: 2"><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; BACKGROUND: #cacaca; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt">
2<o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent">01 02 03 05 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent"> <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent">01 02 03 04 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent">01 02 03 05 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent">01 02 03 07 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent"> <o:p></o:p>
</TD></TR><TR style="HEIGHT: 13.5pt; mso-yfti-irow: 3"><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; BACKGROUND: #cacaca; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt">
3<o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent">01 02 03 06 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent"> <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent">01 02 03 04 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent">01 02 03 05 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent">01 02 03 08 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent"> <o:p></o:p>
</TD></TR><TR style="HEIGHT: 13.5pt; mso-yfti-irow: 4; mso-yfti-lastrow: yes"><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; BACKGROUND: #cacaca; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt">
4<o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent">01 02 03 07 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent"> <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent">01 02 03 04 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent">01 02 03 05 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent">01 02 03 09 <o:p></o:p>
</TD><TD style="BORDER-RIGHT: #ebe9ed; PADDING-RIGHT: 2pt; BORDER-TOP: #ebe9ed; PADDING-LEFT: 2pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ebe9ed; PADDING-TOP: 0cm; BORDER-BOTTOM: #ebe9ed; HEIGHT: 13.5pt; BACKGROUND-COLOR: transparent"> <o:p></o:p>
</TD></TR></TBODY></TABLE>
Any other suggestion would be greatly appreciated.
Thanks again
sezuh
 
Upvote 0
hi,
i tried (sub foo) before i run vb code but still gives me "error 400"
when it reaches to the last row(1048576).
thanks for any help.
sezuh
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,287
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top