473,326 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

apply border to excel sheet from vb coding

198 100+
Hi
how border is applied to excel sheet when i transfer the data into it
i,e if i transfer five rows then border should be applied to five rows and if i transfer 10 rows then border should be on ten rows

please give some help
May 9 '08 #1
2 4349
QVeen72
1,445 Expert 1GB
Hi,

Use this code:

Say, you have transfered 4 lines 7 columns..

Expand|Select|Wrap|Line Numbers
  1. With Range("A1:G4")
  2.  
  3. .Borders(XlBordersIndex.xlEdgeBottom).LineStyle =  _
  4. Excel.XlLineStyle.xlContinuous
  5.  
  6. .Borders(XlBordersIndex.xlEdgeBottom).Weight =  _
  7. Excel.XlBorderWeight.xlHairline
  8.  
  9. End With
  10.  
Regards
Veena
May 9 '08 #2
veer
198 100+
Hi,

Thanks for your reply

varinder


Hi,

Use this code:

Say, you have transfered 4 lines 7 columns..

Expand|Select|Wrap|Line Numbers
  1. With Range("A1:G4")
  2.  
  3. .Borders(XlBordersIndex.xlEdgeBottom).LineStyle =  _
  4. Excel.XlLineStyle.xlContinuous
  5.  
  6. .Borders(XlBordersIndex.xlEdgeBottom).Weight =  _
  7. Excel.XlBorderWeight.xlHairline
  8.  
  9. End With
  10.  
Regards
Veena
May 10 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: sifar | last post by:
Hi, I am right now learning PHP & want to know if there is a way to send web form data to an Excel sheet located on a network. My windows xp PC doesnot have a copy of Excel. Also i am not...
8
by: hyper-sensitive | last post by:
Hi Can some body suggest me which approach I should follow to import millions of records from data base into an excel sheet? I am working with ver. 2000 of MS-Excel . The requirement is to...
2
by: Ch Pravin | last post by:
Hi All: I am having the following xml which i need to convert to excel using xslt. Please help me out. Afghanistan.xml <?xml version="1.0" encoding="utf-16"?> <Languages...
2
by: socialmx | last post by:
Hi dear friends. Can anyone help me? I created a VB form in Excel and a textbox and one command button. When I click the command button the text entered in the textbox will store in the empty cell...
1
by: jayafeb83 | last post by:
First I created One excel sheet, 3 rows and 3 columns and I retrieve excel data using ASP, that one I got the Answer I have to know thatretrieve from excel sheet and store the excel data in...
3
kirubagari
by: kirubagari | last post by:
I would like to duplicate the numbers from from excel sheet 1 to excel sheet 2.Kindly help me on this.Sometime its unable to duplicate.. Sub Duplicate Dim oDoc As Object, oSheet As Object,...
1
kirubagari
by: kirubagari | last post by:
Hai experts, How to duplicate the data from 1 excel sheet to another excel sheet 2. Lets say Name Voucher Value Voucher Number lee 300.00 ...
1
by: PeacefulSoul | last post by:
Hello, I have a lot of excel sheets which columns are slightly different, i want to import all of these sheets (one at a time) into ONE SQL TABLE. I'll give an example : Say ive written the...
0
by: putt73 | last post by:
In order to create styles for an excel sheet like applying border, background color, font what is the common function used? Is there any function to get the styles (format) of an existing excel...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.