Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / August 2007

Tip: Looking for answers? Try searching our database.

data table function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dstiefe - 27 Aug 2007 21:12 GMT
how do i call the data table function in VBA?

Thank you
Michael - 27 Aug 2007 21:46 GMT
Try this:

Sub Test()

Set dataTableRange = Worksheets("Sheet1").Range("A1:K11")
Set rowInputCell = Worksheets("Sheet1").Range("A12")
Set columnInputCell = Worksheets("Sheet1").Range("A13")

Worksheets("Sheet1").Range("A1").Formula = "=A12*A13"
For i = 2 To 11
   Worksheets("Sheet1").Cells(i, 1) = i - 1
   Worksheets("Sheet1").Cells(1, i) = i - 1
Next i
dataTableRange.Table rowInputCell, columnInputCell
With Worksheets("Sheet1").Range("A1").CurrentRegion
   .Rows(1).Font.Bold = True
   .Columns(1).Font.Bold = True
   .Columns.AutoFit
End With

End Sub
Signature

If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.

> how do i call the data table function in VBA?
>
> Thank you
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.