Question about Microsoft Excel for PC

1 Answer

Excel how to acces excel sheet in visual basic

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.


    An expert who has answered 20 questions.


    An expert that hasĀ over 10 points.


    An expert whose answer gotĀ voted for 2 times.

  • Contributor
  • 36 Answers
Re: excel

Hi there. i think this is a great article for you to read. it discusses the way we connect to excel as our data source.

Please Rate. Thanks

Posted on Jan 07, 2008

Add Your Answer

0 characters

Uploading: 0%


Complete. Click "Add" to insert your video. Add


3 Points

Related Questions:

1 Answer

Excel sheet not opening

You should perform a REPAIR installation of MS Office as one of the files is corrupt for some reason

Sep 18, 2009 | Microsoft Office 2003 Basic Edition...


Script to extract URLs in Excel Spreadsheets

The following script could be used to extract the actual URLs from the text link in an Excel spreadsheet. The script writes each URL in the cell next to the text link:

Sub main()
Dim h As Hyperlink

For Each h In ActiveSheet.Hyperlinks
h.Range.Offset(, 1) = h.Address
End Sub

Here is how to use the script:
1. On the "Tools" menu, point to "Macro", and then click "Visual Basic Editor". This will open the Visual Basic Editor in another window.
2. On the extreme left, you will find the "Project - VBAProject". Double-click the icon named "Sheet1 (Sheet1)", "Sheet2 (Sheet2)", or whatever the name of your worksheet. This will open a blank window. Copy & paste the script into this window.
3. Press F5, then click on "Run".
4. Go back to your Excel window. You will now find the URLs listed in the next cell to the original one with the hyperlink.

on Dec 01, 2009 | Microsoft Excel for PC

1 Answer

In Excel trying to compare two ranges

I imagine that the only way is with VBA coding. This is possible if you know programming in Excel (VBA - Visual Basic for Applications).

Apr 17, 2009 | Oracle Database Enterprise Named User Plus

2 Answers

Excel oquestion

how to remove the excel file security pass word

solution explain tel plz

Feb 09, 2009 | Microsoft Office Excel 2003 for PC

1 Answer

How to connect my database to my project?

use Excel library at following location.

D:\Program Files\Microsoft Office\Office12\EXCEL.EXE
Microsoft Excel 12.0 Object Library

Jan 05, 2009 | Microsoft Office Standard for PC

2 Answers

Visual Basic code to paste all items from Office Clipboard into Excel spreadsheet

This may sound like a **** solution, but sometimes SENDKEYS can come in handy for situations like this instead of messing with with more advanced solutions. Also you can try to use win32API calls

Jul 12, 2008 | Microsoft Office Standard for PC

1 Answer

Macro on excel

Macros are a timesaving feature that allow you to record a sequence of actions that you do in excel, and replay them back later.

You give each macro a name, and you can invoke them later, and Excel will "do" whatever it is you did when you recorded the macro.

To record a new macro:
1) Open Excel
2) Go to Tools->Macros->Record New Macro...
3) Type in a name for your macro and hit OK

(A new toolbar will popup with a "stop" button on it. Excel is now recording everything you do)

4) Do something, like, for example, select some cells and make them bold.
5) Click the "stop" button.

Now your macro has been recorded! You can play it back later by:

1) Open Excel
2) Go to Tools->Macros->Macros...
3) Select your macro from the list
4) Click "Run"

The actions you performed earlier will now be executed.


Macros are written in Visual Basic for Applications, or "VBA". It is a programming language which uses the Excel Object Model to perform various actions. You can edit and create custom macros by writing the code manually in VBA. To do this:

1) Open Excel
2) Go to tools->macros->macros...
3) Select an already existing macro
4) Click "Edit"

(The visual basic editor will open, showing you the code for your macro)

At this point you are writing a program in Visual Basic. To learn how to edit macros, you need to learn visual basic, as well as the specific quirks related to excel macros in visual basic.

Recording a macro, and then using it as a template while you edit it is a common trick for making macros manually more quickly.

If you are not familiar with VB, I would not suggest attempting to edit your macros in any but the most simplest of ways. If you're brave, you can try to learn about editing macros in VBA here:

Jan 28, 2008 | Business & Productivity Software

1 Answer



You can make a link into cell that you want by right mouse click
Heperlink, link to , place in thins document , on the feild type the cell reference (A22 ,E56) ...etc , & link where is the cell that you want link to . & in which sheet it is .

i hope good luck

Jan 10, 2008 | Business & Productivity Software

1 Answer

Export data in excel shld yoeet through VB

When i first figured out how to pull data from SQL and put the results in an excel file i referenced these two articles....
Reading and writing excel file using VB.NET (
Get the Values From DataBase and Stored into excell Sheet (

This is the code i ended up using.... (check out those links to see how you need to import the ms office excel reference file with visual basic)

Const stcon As String = "Provider=SQLNCLI;server=xxxxx;database=xxxxx;uid=xxxxx;pwd=xxxxx;DataTypeCompatibility=80"
Dim stSQL As String = "select * from scs_rate_class_money where irate_book = 124 and snew_used = 'U' and sclass = '2' and splan = 'T4' and sopt_code = 'F1'"
Dim cnt As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim fld As ADODB.Field
'Open the connection.

'Open the recordset.
With rst
.CursorLocation = ADODB.CursorLocationEnum.adUseClient
.Open(stSQL, cnt, ADODB.CursorTypeEnum.adOpenForwardOnly, _
ADODB.LockTypeEnum.adLockReadOnly , _
.ActiveConnection = Nothing 'Disconnect the Recordset.
End With
'Close the connection
cnt.Close ()
Dim exp As Export = New Export()
Dim xlApp As New Microsoft.Office.Interop.Excel.Application
Dim xlWBook As Microsoft.Office.Interop.Excel.Workbook = xlApp.Workbooks.Add(Microsoft.Office.Interop.Excel.XlWBATemplate.xlWBATWorksheet )
Dim xlWSheet As Microsoft.Office.Interop.Excel.Worksheet = CType(xlWBook.Worksheets(1), Microsoft.Office.Interop.Excel.Worksheet)
Dim xlRange As Microsoft.Office.Interop.Excel.Range = CType(xlWSheet, Microsoft.Office.Interop.Excel.Worksheet).Range("A2")
Dim xlCalc As Microsoft.Office.Interop.Excel.XlCalculation
Dim i As Short

'Turn off Excel's calculation.
With xlApp
xlCalc = .Calculation
.Calculation = Microsoft.Office.Interop.Excel.XlCalculation.xlCalculationManual
End With
'Write the fieldnames.
For Each fld In rst.Fields
xlRange.Offset(0, i).Value = fld.Name
i = i + 1
'Populate the range.
xlRange.Offset(1, 0).CopyFromRecordset(rst)
'Close the recordset.
'Make Excel available to the user.
With xlApp
.Visible = True
.UserControl = True
'Restore the calculation mode.
.Calculation = xlCalc
End With
'Release variables from memory.
fld = Nothing
rst = Nothing
cnt = Nothing
xlRange = Nothing
xlWSheet = Nothing
xlWBook = Nothing
xlApp = Nothing

Jan 03, 2008 | Business & Productivity Software

1 Answer

Coding in ms word by using visual basic editor

Hello Kavita! If you want to get the most of VB then i advice that you install Microsoft visual studio...But just in case you want it for free you can find it here..

Nov 10, 2007 | Oracle 10g Database Standard (ODBSEONUPP0)

Not finding what you are looking for?
Microsoft Excel for PC Logo

Related Topics:

79 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Business & Productivity Software Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers


Level 3 Expert

18258 Answers

Sudeep Chatterjee
Sudeep Chatterjee

Level 3 Expert

3267 Answers

Are you a Microsoft Business and Productivity Software Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides