A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Trouble with importing cells bigger than 255 char



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old March 13th 06, 09:58 PM posted to microsoft.public.outlook.program_vba
Mo
external usenet poster
 
Posts: 1
Default Trouble with importing cells bigger than 255 char

Hi,

I am trying to import an excel sheet into an excel file. It works,
however, cells that are more than 255 chars are cutting off...here is
the code I am using...Please help!!! Is there an alternative?


'*********************IMPORT EXCEL FILE*********************
Dim Count As Integer
Dim Response As Variant


'***************New Code TO Extract**********************
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Dim CurrentWB As Excel.Workbook
Dim FileName As Variant


FileName = Application.GetOpenFilename _
(filefilter:="Excel Workbook(*.xls),*.txt,All
Files(*.*),*.*")
If FileName = False Then
MsgBox "You did not select a file."
Sheets("Setup").Select
Exit Sub
End If


Application.ScreenUpdating = False
Sheets("RawData").Select
Cells.Select
Selection.ClearContents
Set CurrentWB = ThisWorkbook
Set xlBook = Workbooks.Open(FileName, False, True)
Set xlSheet = xlBook.Worksheets(1)
xlSheet.Copy after:=CurrentWB.Sheets(CurrentWB.Sheets.Count)
xlBook.Close savechanges:=False
'Application.ScreenUpdating = True
CurrentWB.Sheets(CurrentWB.Sheets.Count).Select
Cells.Select
Application.CutCopyMode = False
Selection.Copy
Sheets("RawData").Select
Cells.Select
ActiveSheet.Paste
Columns("A:Z").EntireColumn.AutoFit
Application.DisplayAlerts = False
Worksheets(CurrentWB.Sheets.Count).Delete
Application.DisplayAlerts = True


Set xlSheet = Nothing
Set xlBook = Nothing
Set CurrentWB = Nothing
'*********************IMPORT EXCEL FILE*********************

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I export more than 255 characters in notes? ciareta Outlook - Using Contacts 1 March 7th 06 12:30 AM
Having trouble with Certificates PA Bear Outlook Express 12 February 20th 06 03:55 PM
trouble importing pst files from 2000 to 2003 unc6362 Outlook - Using Contacts 2 January 26th 06 04:31 AM
Make text in folders section bigger. don Outlook Express 3 January 25th 06 09:01 PM
outlook calendar view - change colour of cells older than now MarkB Outlook - Calandaring 1 January 18th 06 02:39 PM


All times are GMT +1. The time now is 08:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.