Click here to Skip to main content
15,913,854 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Standard VB 2013 progress bar animation weirdness Pin
Richard MacCutchan5-Oct-15 3:50
mveRichard MacCutchan5-Oct-15 3:50 
AnswerRe: Standard VB 2013 progress bar animation weirdness Pin
Richard Andrew x645-Oct-15 12:10
professionalRichard Andrew x645-Oct-15 12:10 
GeneralRe: Standard VB 2013 progress bar animation weirdness Pin
Member 15839635-Oct-15 21:33
professionalMember 15839635-Oct-15 21:33 
Questionopen file location thru windows explorer Pin
Mendel Margallo Adona3-Oct-15 20:34
Mendel Margallo Adona3-Oct-15 20:34 
AnswerRe: open file location thru windows explorer Pin
Richard Andrew x644-Oct-15 13:27
professionalRichard Andrew x644-Oct-15 13:27 
GeneralRe: open file location thru windows explorer Pin
Mendel Margallo Adona5-Oct-15 18:10
Mendel Margallo Adona5-Oct-15 18:10 
GeneralRe: open file location thru windows explorer Pin
Mendel Margallo Adona6-Oct-15 0:34
Mendel Margallo Adona6-Oct-15 0:34 
AnswerRe: open file location thru windows explorer Pin
Mendel Margallo Adona6-Oct-15 4:02
Mendel Margallo Adona6-Oct-15 4:02 
QuestionVb6 resource file and ms access database Pin
Otekpo Emmanuel3-Oct-15 2:29
Otekpo Emmanuel3-Oct-15 2:29 
AnswerRe: Vb6 resource file and ms access database Pin
Dave Kreskowiak3-Oct-15 4:58
mveDave Kreskowiak3-Oct-15 4:58 
GeneralRe: Vb6 resource file and ms access database Pin
Otekpo Emmanuel5-Oct-15 6:35
Otekpo Emmanuel5-Oct-15 6:35 
QuestionExcel Macros - copy & paste from one workbook to another Pin
MikeK3229-Sep-15 6:17
MikeK3229-Sep-15 6:17 
AnswerRe: Excel Macros - copy & paste from one workbook to another Pin
CHill6030-Sep-15 0:21
mveCHill6030-Sep-15 0:21 
GeneralRe: Excel Macros - copy & paste from one workbook to another Pin
MikeK3230-Sep-15 9:14
MikeK3230-Sep-15 9:14 
That was not it. Thanks for the suggestion. I am getting a "Runtime error 13" Type Mismatch on the line Set xlWorkSheet1 = ActiveWorksheet

There are 2 possible worksheets that could be the active one so I am trying to check which one is currently active.

Function GetThisWB() As String
GetThisWB = ThisWorkbook.Path & "\" & ThisWorkbook.Name
End Function
Public Sub export_data()

'
'

'Delcare variables
Dim xlApp As New Excel.Application
Dim xlWorkBook1 As Excel.Workbooks
Dim xlWorkBook2 As Excel.Workbooks
Dim xlWorkSheet1 As Excel.Worksheets
Dim xlWorkSheet2 As Excel.Worksheets
Dim xlworksheet3 As Excel.Worksheets
Dim xlSourceRange As Excel.Range
Dim xlDestRange As Excel.Range

'
'Set source workbook as active
'

'Display Excel
xlApp.Visible = True

''Set the source active worksheet
'

If Worksheets("GDI Connector").Activate = True Then
Set xlWorkSheet1 = ActiveSheet
ElseIf Worksheets("GDI Core").Activate = True Then
Set xlWorkSheet2 = ActiveSheet
End If


'Set the source range
xlSourceRange = xlWorkSheets.Range("F1:F120")
xlSourceRange.Copy


'Open workbook 2 and set the destination worksheet as active
Workbooks.Open ("C:\Users\Michael\Documents\Greystone\GDI Line\Denso GDI (Hitachi Templates 7.9.2015)")

xlworksheet3("Export").Select

'Set the destination range
xlDestRange = xlWorkSheets.Range("B34")

'Copy and paste the range
xlDestRange.PasteSpecial

'
Application.Goto Reference:="export_data"
ActiveWorkbook.Save
End Sub
GeneralRe: Excel Macros - copy & paste from one workbook to another Pin
CHill6030-Sep-15 10:27
mveCHill6030-Sep-15 10:27 
QuestionPenny for Pay question Pin
BrianStrong28-Sep-15 14:10
BrianStrong28-Sep-15 14:10 
AnswerRe: Penny for Pay question Pin
Richard MacCutchan28-Sep-15 21:43
mveRichard MacCutchan28-Sep-15 21:43 
AnswerRe: Penny for Pay question Pin
Chris Quinn29-Sep-15 0:53
Chris Quinn29-Sep-15 0:53 
AnswerRe: Penny for Pay question Pin
Matt T Heffron29-Sep-15 10:35
professionalMatt T Heffron29-Sep-15 10:35 
QuestionPlease explain this. Pin
Member 1201796828-Sep-15 11:40
Member 1201796828-Sep-15 11:40 
AnswerRe: Please explain this. Pin
Dave Kreskowiak28-Sep-15 12:22
mveDave Kreskowiak28-Sep-15 12:22 
QuestionImport data from photon Pin
Member 1051522527-Sep-15 19:10
professionalMember 1051522527-Sep-15 19:10 
Questionconverting a embedded xml file resource to a xml object Pin
jkirkerx23-Sep-15 9:51
professionaljkirkerx23-Sep-15 9:51 
Answer[Cancel That] Pin
jkirkerx23-Sep-15 11:36
professionaljkirkerx23-Sep-15 11:36 
QuestionEmbedded Windows Media Player stream playing query Pin
Magrat23-Sep-15 8:26
Magrat23-Sep-15 8:26 

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.