Click here to Skip to main content
16,005,178 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Make a HTTP request in VBScript Pin
Vasudevan Deepak Kumar24-May-07 22:28
Vasudevan Deepak Kumar24-May-07 22:28 
Generalaxdist.exe and PD's setup.exe Pin
Ronb18-Aug-01 19:21
Ronb18-Aug-01 19:21 
GeneralVBA Drag and drop within listbox Pin
18-Aug-01 5:54
suss18-Aug-01 5:54 
QuestionRegistry and backingup with VB? Pin
Yoav16-Aug-01 6:28
Yoav16-Aug-01 6:28 
GeneralFtp Sessions Pin
16-Aug-01 3:40
suss16-Aug-01 3:40 
GeneralRe: Ftp Sessions Pin
Anders Molin20-Sep-01 11:03
professionalAnders Molin20-Sep-01 11:03 
GeneralWord/Excel Macros Pin
15-Aug-01 8:32
suss15-Aug-01 8:32 
GeneralRe: Word/Excel Macros Pin
20-Aug-01 3:51
suss20-Aug-01 3:51 
This code will pass info from word to excel
DDE Example
The following example establishes a DDE link with Microsoft Excel, places some values into cells in the first row of a new worksheet, and charts the values. First, the DDEInitiate function opens a channel to begin the DDE conversation. Then, the DDEExecute statement sends Microsoft Excel the command to open a new worksheet, and the DDERequest function asks Microsoft Excel for the name of the newly created worksheet. A new channel is opened, and the DDEPoke statement sends to Microsoft Excel the data to be charted. Finally, the DDETerminate statement terminates the DDE link with Microsoft Excel, and the DDETerminateAll statement terminates all active DDE links.

Sub ExcelDDE()
Dim intI As Integer, intChan1 As Integer
Dim strTopics As String, strResp As String, strSheetName As String
On Error Resume Next ' Set up error handling.
intChan1 = DDEInitiate("Excel", "System") ' Establish link.
If Err Then ' If error occurs, Excel may
Err = 0 ' not be running. Reset error
Shell "C:\Excel\Excel.exe", 1 ' and start spreadsheet.
If Err Then Exit Sub ' If another error, exit.
' Establish Spreadsheet link.
intChan1 = DDEInitiate("Excel", "System")
End If
' Create new worksheet.
DDEExecute intChan1, "[New(1)]" ' Get topic list, worksheet name.
strTopics = DDERequest(intChan1, "Selection")
strSheetName = Left(strTopics, InStr(1, strTopics, "!") - 1) ' Terminate DDE link.
DDETerminate intChan1 ' Establish link with new worksheet.
intChan1 = DDEInitiate("Excel", strSheetName)
For intI = 1 To 10 ' Put some values into
DDEPoke intChan1, "R1C" & intI, intI ' first row.
Next intI ' Make chart.
DDEExecute intChan1, "[Select(""R1C1:R1C10"")][New(2,2)]" ' Terminate all links.
DDETerminateAll
End Sub
Cool | :cool:
GeneralRe: Word/Excel Macros Pin
25-Aug-01 6:47
suss25-Aug-01 6:47 
GeneralRe: Word/Excel Macros Pin
26-Aug-01 8:20
suss26-Aug-01 8:20 
GeneralUsing Static Library in VB Pin
13-Aug-01 22:47
suss13-Aug-01 22:47 
GeneralRe: Using Static Library in VB Pin
Pete Bassett16-Aug-01 6:31
Pete Bassett16-Aug-01 6:31 
GeneralRe: Using Static Library in VB Pin
3-Sep-01 12:14
suss3-Sep-01 12:14 
GeneralRe: Using Static Library in VB Pin
8-Dec-01 21:30
suss8-Dec-01 21:30 
QuestionHow to deal with images Pin
13-Aug-01 2:43
suss13-Aug-01 2:43 
GeneralQuick question Pin
Steve Thresher10-Aug-01 3:17
Steve Thresher10-Aug-01 3:17 
GeneralRe: Quick question Pin
Yoav16-Aug-01 6:36
Yoav16-Aug-01 6:36 
GeneralPackaging and Deployment Pin
Ronb9-Aug-01 18:26
Ronb9-Aug-01 18:26 
Questionhow to deploy a excel application Pin
zecodela9-Aug-01 18:25
zecodela9-Aug-01 18:25 
GeneralCopying files Pin
MARNEFFE Philippe7-Aug-01 9:27
MARNEFFE Philippe7-Aug-01 9:27 
GeneralRe: Copying files Pin
Cem Kalyoncu7-Aug-01 12:24
Cem Kalyoncu7-Aug-01 12:24 
GeneralRe: Copying files Pin
chris foote7-Aug-01 17:19
chris foote7-Aug-01 17:19 
QuestionChanging the clipboard from VB for applications? Pin
Daniel Fallman31-Jul-01 1:08
Daniel Fallman31-Jul-01 1:08 
GeneralMulti language Pin
30-Jul-01 23:19
suss30-Jul-01 23:19 
GeneralCoInitialize has not been called Pin
29-Jul-01 3:21
suss29-Jul-01 3:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.