Hi All !
I am new joinee to mrexcel forum.I have written one code and i am stuck at one line which has stop me for further designing of my code.
Code :-
Sub Main_report()
'
' Main_report Macro
' Macro recorded 2008-06-10 by amish
'
' Main
MsgBox ("Open Syslog Main Report")
Dim vaReport As Variant
Dim i As Integer
Dim wb As Object
vaReport = Application.GetOpenFilename _
(FileFilter:="Excel Filer (*.xls),*.xls", _
Title:="Select Standard Syslog Report", MultiSelect:=False)
Workbooks.Open vaReport
Workbooks.OpenText Filename:="Main.xls", _
Origin:=437, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=False, Space:=False, Other:=True, OtherChar:=":", FieldInfo:= _
Array(1, 1), TrailingMinusNumbers:=True
Cells.Find(What:="reset", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 1).Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
"Want to activate open vaReport here coz it contain below mentioned Sheet "
Sheets("Syslog-summary-Bangalore").Select
Range("A1").Select
-----------------------------------------------------------------------
I am only pasting beginining part of my whole code.Now my problem is i am asking to open Main report using variant variable that is happening succesful now later in my code i have to activate this report.
I have try many ways but getting only error.
So plz show how to activate open Report !!!!!!
I am new joinee to mrexcel forum.I have written one code and i am stuck at one line which has stop me for further designing of my code.
Code :-
Sub Main_report()
'
' Main_report Macro
' Macro recorded 2008-06-10 by amish
'
' Main
MsgBox ("Open Syslog Main Report")
Dim vaReport As Variant
Dim i As Integer
Dim wb As Object
vaReport = Application.GetOpenFilename _
(FileFilter:="Excel Filer (*.xls),*.xls", _
Title:="Select Standard Syslog Report", MultiSelect:=False)
Workbooks.Open vaReport
Workbooks.OpenText Filename:="Main.xls", _
Origin:=437, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=False, Space:=False, Other:=True, OtherChar:=":", FieldInfo:= _
Array(1, 1), TrailingMinusNumbers:=True
Cells.Find(What:="reset", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 1).Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
"Want to activate open vaReport here coz it contain below mentioned Sheet "
Sheets("Syslog-summary-Bangalore").Select
Range("A1").Select
-----------------------------------------------------------------------
I am only pasting beginining part of my whole code.Now my problem is i am asking to open Main report using variant variable that is happening succesful now later in my code i have to activate this report.
I have try many ways but getting only error.
So plz show how to activate open Report !!!!!!