View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
JosephVBA JosephVBA is offline
external usenet poster
 
Posts: 6
Default Problem with create an add-in

I'm sorry, I made a mistake. When I converted xls file to add-in, sheet with
data was invisible, so I copied sheet:
workbooks("data.xla").sheets("data").copy. It created new workbook, but I
forgot that's normal that by copying Excel truncates the data to 255 char.
Now I try msgbox workbooks("data.xla").sheets("data").range("a1") and it
shows correct.
Thanks for your help.

"Norman Jones" wrote:

Hi Joseph,

I followed your suggestions but I was unable to replicate your results.

Using xl2k, a 360 character test string remained untruncated.

---
Regards,
Norman



"JosephVBA" wrote in message
...
Try to create new workbook, in range("a1") write text with more than 255
char, save it as xls file and then convert to an addin. You'll see that
after
converting excel truncates data to 255 char in range("a1").


"Tom Ogilvy" wrote:

I have never heard that excel truncates data if you convert the workbook
to
an addin. Perhaps it hasn't, but you are not retrieving all the data.
What action leads you to believe your data has been reduced to 255
characters?

--
Regards,
Tom Ogilvy

"JosephVBA" wrote in message
...
Thanks, you solved problem. I have one question yet. Is any way how to
reach
that the cell in add-in may contain more than 255 char? I have one
database
as excel sheet and I want to save it as add-in, but then I lost some
data
in
cell if it contains more than 255 char.
Or the solution is only to have this data in Exel sheet (xls) and make
a
reference in vba macro in add-in?

"Tom Ogilvy" wrote:

How are you trying to create the addin.

Assume you have MyAddin.xls open in Excel.

go to the vbe and select the project in the project explorer. Click
on
the
ThisWorkbook entry and in the properties window, change IsAddin to
true.

Go to the immediate window and execute the command

Workbooks("MyAddin.xls").SaveAs "C:\MyAddin.xla",
FileFormat:=xlAddIn

--
Regards,
Tom Ogilvy


"JosephVBA" wrote in message
...
I tried to create add-in, but there is an alert message something
like
"File
is not compatible with SYLK....You can choose Yes but you may lost
some
function, or data, or choose No and save it like xls file. So I
cannot
create
an add-in.
When I choose Yes, it creates xla file, but if I try to add it to
excel,
it
message Add-in xxx is not valid.