Can I import text file into excel,when hidden

February 18, 2011 at 17:57:29
Specs: Windows XP
Hi, I have made a macro to import text file into excel 2007 and that works fine. I would like to hide the particular sheet hidden,when it is being done,so that no one sees what it is being imported. Is that possible ?

Manuel


See More: Can I import text file into excel,when hidden

Report •

#1
February 18, 2011 at 21:28:13
Why not share the macro with us so that we don't have to start from scratch?

Please read the How To referenced in my signature line before posting the code.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
February 21, 2011 at 06:35:12
Sub LOAD_Click()
'
' LOAD_Click Macro
'

'

Sheets("FILE").Select
Columns("A:AD").Select
Selection.ClearContents
With ActiveSheet.QueryTables.Add(Connection:="TEXT;C:\DEPOSIT.txt", _
Destination:=Range("$A$1"))
.Name = "DEPOSIT_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1)
.TextFileFixedColumnWidths = Array(9, 11, 22, 60, 8, 13, 8, 102, 8, 1, 4, 260, 30, 43, 7, _
22, 40, 40, 40, 48, 12, 12)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With

This is the macro I have recorded. In this case what I need is that the sheet "FILE" has to be kept hidden, when this macro is running.

Regards , Manuel


Report •
Related Solutions


Ask Question