![]() |
Public fixed length string variable
I am generating a fixed length text file from my Excel 2003 data for
import into an accounting system. I have it working okay by padding the cells with spaces and trimming appropriately before stringing the cell values together for export. I was hoping to simplify my process with a class module with properly lengthed string variables; but, I don't seem to be able to declare fixed length string variable as Public. I have a POHeader class module and i want to have e.g. public PO_ID As String * 10 I can use Dim PO_ID As String * 10 in my regular module and it works; but if I use that in the POHeader class module I can't get to it from the regular module. Is this a limitation of class modules or am I overlooking something or does anyone have any other ideas? Thanks Ken |
Public fixed length string variable
There are various things that can't be declared as public in class/object
modules, and a fixed length string is one of them. A simple workaround is to declare as private and use a [public] property let/get pair to access it. Regards, Peter T "Ken" wrote in message ... I am generating a fixed length text file from my Excel 2003 data for import into an accounting system. I have it working okay by padding the cells with spaces and trimming appropriately before stringing the cell values together for export. I was hoping to simplify my process with a class module with properly lengthed string variables; but, I don't seem to be able to declare fixed length string variable as Public. I have a POHeader class module and i want to have e.g. public PO_ID As String * 10 I can use Dim PO_ID As String * 10 in my regular module and it works; but if I use that in the POHeader class module I can't get to it from the regular module. Is this a limitation of class modules or am I overlooking something or does anyone have any other ideas? Thanks Ken |
Public fixed length string variable
Thanks Peter, I will look into that approach.
Ken On Feb 2, 4:07*pm, "Peter T" <peter_t@discussions wrote: There are various things that can't be declared as public in class/object modules, and a fixed length string is one of them. A simple workaround is to declare as private and use a [public] property let/get pair to access it. Regards, Peter T "Ken" wrote in message ... I am generating a fixed length text file from my Excel 2003 data for import into an accounting system. *I have it working okay by padding the cells with spaces and trimming appropriately before stringing the cell values together for export. *I was hoping to simplify my process with a class module with properly lengthed string variables; but, I don't seem to be able to declare fixed length string variable as Public. *I have a POHeader class module and i want to have e.g. public PO_ID As String * 10 I can use Dim PO_ID As String * 10 in my regular module and it works; but if I use that in the POHeader class module I can't get to it from the regular module. *Is this a limitation of class modules or am I overlooking something or does anyone have any other ideas? Thanks Ken- Hide quoted text - - Show quoted text - |
All times are GMT +1. The time now is 08:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com