473,807 Members | 2,827 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

apply border to excel sheet from vb coding

198 New Member
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 4365
QVeen72
1,445 Recognized Expert Top Contributor
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 New Member
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
4284
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 connected to the internet, its a local computer. What i am trying to do is to make a PHP script which will send a simple form data to an excel sheet (or create a new Excel sheet) on another PC on a network.
8
4615
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 dynamically load 65,000 rows to one excel-grid(worksheet) ,then create and load the other grids(worksheets) till the data has been loaded fully. How can I do this using the Filestream object ,in a very short span of time like some seconds? Here,...
2
8920
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 BuildVersion="1,5,0815,0 " CountryName="Afghanistan" > <Language locale="English">
2
3755
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 range. Of course it will show do. But I like when I entered in the text in the textbox which already entered in the Excel sheet msgbox should show that the text already entered you cannot reenter and it should not enter the text again in sheet. I...
1
2150
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 database using ASP OS:Windows XP Language: ASP
3
5049
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, oCell As Object, oCell2 As Object, oCell3 As Object, oString As String Dim oCells As Object Dim oCursors As Object Dim aAddresss As Variant
1
2694
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 58419-58421 meena 300.00 58422-58424 Tan 300.00 58425-58427
1
1967
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 required program and called it Excel2sql converter. So Excel2sql takes an excel sheet and create a database table with the data of that excel sheet, For example say i have the following excel sheet: Excel_Sheet_1 -----------------------------...
0
1023
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 sheet?
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10628
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10373
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.