Click here to Skip to main content
15,891,136 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Array to listbox an back to an array Pin
Luc Pattyn2-Apr-08 0:59
sitebuilderLuc Pattyn2-Apr-08 0:59 
GeneralRe: Array to listbox an back to an array Pin
Fatboy582-Apr-08 1:15
Fatboy582-Apr-08 1:15 
GeneralRe: Array to listbox an back to an array Pin
Luc Pattyn2-Apr-08 1:18
sitebuilderLuc Pattyn2-Apr-08 1:18 
GeneralRe: Array to listbox an back to an array Pin
Fatboy582-Apr-08 1:24
Fatboy582-Apr-08 1:24 
GeneralRe: Array to listbox an back to an array Pin
Luc Pattyn2-Apr-08 1:29
sitebuilderLuc Pattyn2-Apr-08 1:29 
Generaldatabase display in windows application Pin
tanya20011-Apr-08 23:05
tanya20011-Apr-08 23:05 
GeneralRe: database display in windows application Pin
Vimalsoft(Pty) Ltd2-Apr-08 2:38
professionalVimalsoft(Pty) Ltd2-Apr-08 2:38 
GeneralConverting Msflexgrid content to Excel Pin
aaraaayen1-Apr-08 20:30
aaraaayen1-Apr-08 20:30 
Hi All,

I am using the following code to convert the MSflexgrid content to Excel.

This code is also working fine. It opens MS Excel and paste the contents of MSFlexgrid.

But now for me, when i click the button it should ask Open, Save (or)Cancel kind of dialog box, and if press Save it should show Save dialog box and give filename and save it, or if we Give open it should open the excel sheet.

Please help me how to do that.

Code:

Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Set xlApp = New Excel.Application
Set xlWB = xlApp.Workbooks.Add
Clipboard.Clear 'Clear the Clipboard

With MSFlexGrid1 'Select Full Contents (You could also select partial content)
.Col = 0 'From first column
.Row = 0 'From first Row (header)
.ColSel = .Cols - 1 'Select all columns
.RowSel = .Rows - 1 'Select all rows
Clipboard.SetText .Clip 'Send to Clipboard
End With

With xlApp.ActiveWorkbook.ActiveSheet
.Range("C2").Select 'Select Cell A1 (will paste from here, to different cells)
.Paste 'Paste clipboard contents
End With ' This makes Excel visible
xlApp.Visible = True

Thanks in Advance,

Regards
GeneralRe: Converting Msflexgrid content to Excel Pin
Dave Kreskowiak2-Apr-08 3:34
mveDave Kreskowiak2-Apr-08 3:34 
Questionweb service access control Pin
Ismaeel1-Apr-08 16:08
Ismaeel1-Apr-08 16:08 
GeneralRe: web service access control Pin
Dave Kreskowiak2-Apr-08 3:32
mveDave Kreskowiak2-Apr-08 3:32 
GeneralFind PivotTable in Excel Pin
Bomb_shell1-Apr-08 9:58
Bomb_shell1-Apr-08 9:58 
GeneralRe: Find PivotTable in Excel Pin
ne0h1-Apr-08 19:56
ne0h1-Apr-08 19:56 
GeneralRe: Find PivotTable in Excel Pin
Mitch F.1-Apr-08 20:15
Mitch F.1-Apr-08 20:15 
GeneralRe: Find PivotTable in Excel Pin
Bomb_shell2-Apr-08 15:14
Bomb_shell2-Apr-08 15:14 
QuestionMustInherit UserControl [modified] Pin
vocaris1-Apr-08 9:39
vocaris1-Apr-08 9:39 
GeneralRe: MustInherit UserControl Pin
Dave Kreskowiak2-Apr-08 3:29
mveDave Kreskowiak2-Apr-08 3:29 
QuestionTextFieldParser language question Pin
Vinny_681-Apr-08 4:48
Vinny_681-Apr-08 4:48 
GeneralRe: TextFieldParser language question Pin
Luc Pattyn1-Apr-08 5:38
sitebuilderLuc Pattyn1-Apr-08 5:38 
GeneralRe: TextFieldParser language question Pin
Vinny_682-Apr-08 2:06
Vinny_682-Apr-08 2:06 
GeneralRe: TextFieldParser language question Pin
Luc Pattyn2-Apr-08 2:27
sitebuilderLuc Pattyn2-Apr-08 2:27 
GeneralNew to VB - NewFile Dialog / SaveFile Dialog help needed. Pin
Adam.m.Nelson1-Apr-08 3:30
Adam.m.Nelson1-Apr-08 3:30 
GeneralRe: New to VB - NewFile Dialog / SaveFile Dialog help needed. Pin
Mitch F.1-Apr-08 9:59
Mitch F.1-Apr-08 9:59 
GeneralRe: New to VB - NewFile Dialog / SaveFile Dialog help needed. Pin
Adam.m.Nelson1-Apr-08 10:33
Adam.m.Nelson1-Apr-08 10:33 
GeneralRe: New to VB - NewFile Dialog / SaveFile Dialog help needed. [modified] Pin
Mitch F.1-Apr-08 10:39
Mitch F.1-Apr-08 10:39 

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.