This particular area of the program builds a Excel spreadsheet for the
user to manipulate further. After turning Option Strict On and
correcting everything I can the following line remains -- any ideas
how to reconstruct this so it doesn't think its a late bound object?
xlWS.Cells(row, col).value = ObjColumn.Heade rOne & " " &
ObjColumn.Heade rTwo
XLWS is defined as an Excel.Worksheet and xlWS.Cells(row, col).value
apears to be late bound -- what do I need to use in place of this? 3 3868
Try to caste the Cells(...) call into the object type you expect (a Range?).
CType(xlWS.Cell s(row, col), Excel.Range).va lue=...
Or something like that.
"DK" <dw*****@ermc o-eci.comwrote in message
news:11******** **************@ v2g2000hsf.goog legroups.com...
This particular area of the program builds a Excel spreadsheet for the
user to manipulate further. After turning Option Strict On and
correcting everything I can the following line remains -- any ideas
how to reconstruct this so it doesn't think its a late bound object?
xlWS.Cells(row, col).value = ObjColumn.Heade rOne & " " &
ObjColumn.Heade rTwo
XLWS is defined as an Excel.Worksheet and xlWS.Cells(row, col).value
apears to be late bound -- what do I need to use in place of this?
DK,
The way I would do it, was using the intelligence, as xlWS is correct then
it will give after the dot what you can use.
In other words, type it over again.
If there then is something that is not in your intelligence, then you have
to (direct)cast it, to a "type" that contain then what you are using.
Cor
On Nov 14, 12:53 pm, "Cor Ligthert[MVP]" <notmyfirstn... @planet.nl>
wrote:
DK,
The way I would do it, was using the intelligence, as xlWS is correct then
it will give after the dot what you can use.
In other words, type it over again.
If there then is something that is not in your intelligence, then you have
to (direct)cast it, to a "type" that contain then what you are using.
Cor
Agreed but it looks nasty:
xlWS.Range(xlWS .Cells(row, col), xlWS.Cells(row, col)).Value =
ObjColumn.Heade rOne & " " & ObjColumn.Heade rTwo This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Karl Lang |
last post by:
Hi
I've created a new configuration section in Web.Config to hold the
connection string for my database. If I have Option Strict On I get a
message "Option Strict On disallows late binding" when I try to retrieve the
string. Now I'd rather not turn off option strict but I'd also prefer to
have my connection string in one place. Does anyone have any ideas where I'm
going wrong with this?
This is the code
In Web.Config (I've removed some...
|
by: Simon Harris |
last post by:
Hi All,
I've been advised to use option strict. I've tried to read up on this, all i
can find is that it...
"disallows implicit narrowing conversions"
This kinda makes sense - Means I have to explicitly cast or convert data
when comparing/setting two different data types right?
|
by: Dieter Schwerdtfeger via DotNetMonster.com |
last post by:
I have this function where i search through my database for items that were made on a specific date. The line "CType(dvClubs.Item(teller).Item(veld).ToShortDateString" gives me the error : option strict on disallows late binding. I have read some posts here about late binding but I just can't figure it out :s This code worked with option strict off, but i just heard that we had to write our program with option strict on :/
I hope you guys can...
|
by: Starbuck |
last post by:
Hi
The following generates an error when Option Strict is On
Can anytell tell me how to get round this please.
Private Sub optWithTone_CheckedChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles optWithTone.CheckedChanged
If eventSender.Checked Then
pAlarmOption = NokiaCLCalendar.CalendarAlarmType.CALENDAR_ALARM_WITH_TONE
|
by: Heinz |
last post by:
Hi all,
I use VB.net 2003 and want to export data to Excel. Target PCs still
have Office 2000 so I could not use Microsofts PIAs. Instead I use the
included Excel 10 COM DLL from Microsoft. Everything works fine.
Now I want to sign my application with a strong name. Therefore I also
need to sign all DLLs. So I searched through the web and found
information that I need to use tlbimp, and the source file is
'xl5en32.olb'. Now this also...
| |
by: Owen Mortensen |
last post by:
(This code was working in asp.net 1.1 VS2003. After upgrade to VS2005,
chokes):
in the aspx file:
<ItemTemplate>
<asp:datagrid id="dg_instr" runat="server" AutoGenerateColumns="False"
HeaderStyle-Font-Bold="True"
CellPadding="0" CellSpacing="1" Font-Size="Small" BackColor="Transparent"
ForeColor="Black"
|
by: Adotek |
last post by:
Hi All,
I've just converted a solution from .Net v1.1 to v2.0, by allowing
Visual Studio 2005 to do the conversion.
Since doing so, I am getting a compilation error as follows:
"Option Strict On disallows late binding."
This references line 1, which is my page directive:
|
by: Rob |
last post by:
I have employed a "Singleton mode" of programming for this project.
I have a class that exposes some properties of the class "Sample" to other
forms....
If I set Option Strict On, I get many "Option Strict On disallows late
binding" errors (see below)
How might I fix this ?
|
by: Lynn |
last post by:
Hello,
I have a website that is working fine. I have just turned on "option strict"
and am getting an error with the parts of my code. I have fixed everything
but this section, which has me baffled.
I am getting the error "option Strict On disallows late binding", and the
error is referring to this line of code: (3rd line in my sub below)
Select Case sender.Parent.ID
|
by: Ronald S. Cook |
last post by:
Hi,
I'm wanting to iterate over a generic IList, but the code won't compile
because the blue sqiggle line under:
_DataRow("SecurityFunctionName") = _IList(i).SecurityFunctionName;
sez "Option Strict On disallows late binding"
If I comment out the line and get to that place in the debugger, I can pull
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |