Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Copying Checkbox From Within Code In Excel


With the code below I'm trying to copy a checkbox from a row to the row below. LastRow is used as an index pointer to the last completed row in the Excel spreadsheet.
CheckBoxName starts at chkbox1.

The control is copied to the row below but the linked cell stays the same as the control copied . I''m unable to change the linking by code ! can anyone help me ?

Thanks Ian

p.s. What is the difference between xlcheckbox and checkbox ?

ChkBoxName = "CheckBox" & LastRow - 11
ActiveSheet.Shapes(ChkBoxName).Select
Application.CutCopyMode = False
Selection.Copy
Range(Cells(LastRow + 1, 1), Cells(LastRow + 1, 1)).Select
ActiveSheet.Paste
ChkBoxName = "CheckBox" & LastRow - 10
ActiveSheet.Shapes(ChkBoxName).Select
ActiveSheet.Shapes(ChkBoxName).LinkFormat.LinkedCell = "B" & LastRow + 1




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Code Needed For Adding And Copying Excel Worksheet From VB 6.0
I am looking for a code that would add and copy Excel worksheet from VB 6.0. I'd apprciate if someone can help me please.

Can U Please Help Me With The Complete Code For Copying Datagrid Data On To An Excel File
can u please help me with the complete code for copying datagrid data on to an excel file ...?

Newbie In VBA Excel Needs Help In Copying && Updating Excel Columns
Hi,

I'm a newbie in using VBA Excel and have never use VBA excel before and am totally lost in my problem. Thus, i would GREATLY appreciate a direction or two.

I have 2 worksheets ONE and TWO. Both have the same columns type and column number (approximately 15) with worksheet TWO being the more updated worksheet.

I need to find the rows in worksheet TWO which are not present in worksheet ONE by comparing column A in both worksheets. After which i will copy the whole row from worksheet TWO to worksheet ONE. During the process of comparing column A in both worksheets, i also need to update column C and E of worksheet ONE.

I can do the above without using VBA but i need to create a macro for it to automate the whole process for future uses.

Would appreciate any help greatly! Thanks in advance!

Checkbox Code
I have this

Private Sub CheckBox1_Click()
If CheckBox1.Value = vbChecked Then
Range("D10").Value = 0
Else
Range("D10").Value = 2
End If
End Sub

it does what I want it to do, which is set column D10 to 2 if checkbox is checked. But I think the logic is above is opposite of what it is actually doing...

Above says, if checked then value=0 else value=2. Am I right on this or is this just the way VB's logic is?

Thanks

How To Code Listview Checkbox
can anyone help me with this problem...I don't know how to code the listview checkbox

How To 'uncheck' A Checkbox With Code
There is a Checkbox on a Form. Is there some code I can write for a "Clear" command button to uncheck (or de-select) the check box?
I don't think I need to post the code, as this is a general question.

thanks

Checkbox Code Wouldn't Run!!!
I am a beginner at vb and the code I wrote which involves checkboxes wouldn't run. It says compile error: variable not defined and the statement chkShampoo is highlighted. I have no clue what's wrong. Can someone please help. Thanx!


' Alexandra
' This program allows the user
' to generate the price of a pet grooming
' session based on the services performed.
' November 23, 2001

Option Explicit

Private Const curShampoo As Currency = 20
Private Const curFleaDip As Currency = 25
Private Const curTrim As Currency = 30
Private Const curFullShave As Currency = 15
Private curTotal As Currency

Private Sub Form_Load()
chkShammpoo.Value = vbUnchecked
chkFleaDip.Value = vbUnchecked
chkTrim.Value = vbUnchecked
chkFullShave.Value = vbUnchecked


Private Sub chkShampoo_Click()
If chkShampoo.Value = vbChecked Then
curTotal = curShampoo
lblTotal.Caption = curTotal

Private Sub chkFleaDip_Click()
If chkFleaDip.Value = vbChecked Then
curTotal = curShampoo + curFleaDip
lblTotal.Caption = curTotal

If chkTrim = vbChecked Then
curTotal = curShampoo + curFleaDip + curTrim
lblTotal.Caption = curTotal

If chkFullShave.Value = vbChecked Then
curTotal = curShampoo + curFleaDip + curTrim + curFullShave
lblTotal.Caption = curTotal

End If
End If
End If
End If
End Sub

Private Sub cmdPrint_Click()
chkShammpoo.Value = vbUnchecked
chkFleaDip.Value = vbUnchecked
chkTrim.Value = vbUnchecked
chkFullShave.Value = vbUnchecked
lblTotal.Caption = curTotal

End Sub

Private Sub cmdDone_Click()
Unload Me
End Sub

Code For Checkbox In Runtime?
Hi
I was able to create checkboxes in runtime but I wasn’t able to put the code behind those checkboxes.

Any ideas?

Thanks in advance.

Code For Copying...
Is there code I can use that will add text from a textbox to the clipboard to use for pasteing?

Filter On Checkbox Field Using Code???
**********EDIT. I solved the problem by changing the sql statement used for the source of the recordset....

mods please feel free to delete

EDIT*****************************************************


i have a field in an access database called acceptchanges..it is defined as a yes/no which says if it is checked or unchecked... i am trying to filter a recordset in vb6 on this field using the following line of code but cant get it to work


Code:

.Filter = "AcceptChanges = -1"
i get an error.. arguments are of the wrong type, are out of acceptable range, or are in conflict with each other...

please help

Procedurally Generated Checkbox Code
I currently want to use a check box on a contents page to show or hide worksheets in a workbook. Both the sheets and the checkboxes will be procedurally generated as part of a macro that updates a quarterly report.

If I use the check box from the forms toolbox (not the controls toolbox), I can assign a macro to the checkbox on creation so that when it is clicked it shows or hides the desired sheet. This is basically what I want it to do, note that both the worksheet and the check box that shows/hides it have the same name.


Code:
Sub Showsheet()
If ActiveSheet.Shapes(SHAPENAME) = True Then
Worksheets(SHAPENAME).show
Elseif ActiveSheet.Shapes(SHAPENAME) = False
Worksheets(SHAPENAME).hide
End If
End


All checkboxes will run the same code (I can’t create new code for each checkbox because the checkboxes are procedurally generated), so how do I determine which check box called the macro?

I can’t think of any other way to do this. Also what’s the difference between the check boxes in the forms toolbox and the controls toolbox?

What Is Wrong With My ListView Checkbox Code?
Hi, I have a ListView control that lists movies to be checked out. To checkout a movie, one has to tick in a checkbox infront of the movie title in a select row. How ever, in my code below, when I select more than 2 movies from the list, the first checkbox is the one captured in the database leaving out the second selection BUT still in the database, the entry is captured twice (repeated corresponding to the number of ticked checkboxes). The other thing is that, when you tick the checkbox, the row does not get selected.

VB Code:
Private Sub cmdCheckIn_Click()Dim li As ListItemSet rst = New ADODB.RecordsetDim i As Long strSql = "INSERT INTO trans1 (UserNo, TransDate) VALUES ("strSql = strSql & cboCustomerID.ItemData(cboCustomerID.ListIndex) & ", "strSql = strSql & "'" & dtpCheckIn.Value & "') " adoCn.Execute strSql ' Insert all checked items in the ListView control For i = 1 To lvwCheckIn.ListItems.Count     If lvwCheckIn.ListItems.Item(i).Checked = True Then            Set rst = adoCn.Execute("Select @@Identity")        lngNewId = rst.Fields(0).Value strSql = "INSERT INTO TransDetails (transactID, TransTypeID, movie_inventoryId, ItemReturnDate) VALUES ("strSql = strSql & lngNewId & ","strSql = strSql & cboTransType.ItemData(cboTransType.ListIndex) & ","strSql = strSql & lvwCheckIn.SelectedItem.Text & ", "strSql = strSql & "#" & dtpCheckIn.Value & "# ) " adoCn.Execute strSql End IfNext '#### Close the connection    adoCn.Close lvwCheckIn.ListItems.Clear End Sub


Thanks for your help.

Checkbox Behavior When Setting Value In Code
I have an applcation where I need to set the value of a checkbox within a procedure which is called in the forms load function. the peculiar thing is that every time I run the application the chkBox's on_click event is triggered upon loading. Why is this?

Checkbox In Excel?
I want to have a checkbox in Excel that basically is true if one of the cells is true. I have three colors to choose from. I have blue, white and black. If I enter blue into a designated cell, then I want one of two checkboxes checked. White is the same as blue. If I enter black into that cell, then I want the other checkbox checked. Is this possible? Also, if I have one checkbox checked on one sheet, can I set it up that other sheets in the workbook check the same checkboxes? Thanks for any help.

VB Excel Checkbox Help
Ok I'm am new at VB and I need some help. What I'm trying to do is create checkbox to look at a range of cells and see if there is any data in those cells. If all cells have data in them, then make the box with a check. In this case the data in the cells will be dates.

I appreciate any help.

Code For Copying Worksheets
Hi,

I need VBA code that copies worksheet 1 to worksheet 2 when worksheet 1 is initially opened and before any changes are done to it.

Also I need to know how i can insert columns that represent months in a calendar year. I can do it manually however I need columns representing the calendar year from 2002-2007 so doing it manually would be a pain. Is there a better way, coding or something that i don't know.

Thanks

Absolute beginner.

Copying Certain Code From Module
heller, peepz....
can anyone show me how to copy certain procedures from one module to another by vb?
thanx for the help.

Need Help To Do Copying Of Cells By Using VBA Code
Has tried using macros but i require a loop to repeat this action.

On the left is the series of data that will be copied and pasted in ANOTHER sheet. (In the picture, i just paste in the same sheet for simplicity.)

The first 4 columns have no data and "AAA" will be pasted in the first column on a new sheet. From A10 to A17, the data will be copied and then special paste transpose to the right of "AAA". It will be the same as "BBB" and then the data below is pasted as the same as "AAA" Next to "CCC" (which is not shown) it will be 2 columns below the 8 previous datas and after "CCC" will be 4 columns and then 8 datas again. From here, it will be the same cycle.

Any way to code this in vba using a loop. Thanks for your all suggestions and advice!

Copying && Pasting Code
OK, so somer of you may remember me from about the end of last year when I was working on a project. I've got version 1.0 in production, and am currently working on new features that they have asked for in version 1.1.

I've worked many of them out, but have a question. OK, so what I need to do is have buttons on the toolbar that find out what text is selected and copy it to the clipaboard, and also paste that text in at the current cursor location.

I know in textboxes that they can just right-click, or use keyboard shortcuts (CTRL+C and CTRL+V), but as these are automatically done by Windows/VB, I'm at a loss as to how it should be done. It's probably very simple, but I just can't think of how it's done.

Need Help With How To Copying And Pasting My Code
Hi,
I've made a boardgame and I would like to somehow like to copy and paste info from Player 1 to Player 2.

If possible can the players tokens not overlap when they pass each other in the boxes.

Please find attached .zip file.

If you can help thanks heaps, if not thanks for having a look.


Rastin

Copying Code From Forum
Am I doing something wrong?

When I copy some code from someone's forum question into the VB code window, instead of coming out formatted (i.e. each line of code on it's own line as in the original forum message) it gets pasted as one long line!

Surely I am missing something!

Thanks,

~seaweed

Copying Code From Posts
Okey, this is now starting really, REALLY p**sing me off. How in h*ll can you copy the code in these posts WITH all the line switches ("enter's"). When I copy code from here, and paste it into anyprogram it will all end up on one long line which I then have to start guessing where to break lines. This is kind of irritating... does anyone know how to copy all of the characters?

Setting A Field In Datagrid As Checkbox From Code In VB
hi

Can anyone tell me the exact syntax to set a particular column in a datagrid as a checkbox from the code.

Thankx,
Nemani.

Help Re: Copying Worksheet In Excel 97 V. Excel XP
I have a function that works perfectly in Excel XP, but crashes in (1004 runtime error, Copy Method) 97. All it is doing is copy an existing, hidden template worksheet to the same workbook and specifying which worksheet it should be after. Can anyone tell me what I am doing wrong?
Thanks very much.

Function CreateNewSheet(year, afterYear)
  'MsgBox year
    Application.ScreenUpdating = False
    Dim AfterY As Integer
    Dim SheetName As String
    Dim AfterIndex As Integer
    AfterIndex = 0
    AfterY = year - 1

    If afterYear = "" Then
        Sheets("datasrc template").Copy After:=ActiveSheet
    Else
        Sheets("datasrc template").Copy After:=Worksheets(afterYear) <-- error here
    End If
        
    ActiveSheet.Name = year
    InsertNewYearCells (year)
    Worksheets(year).Activate
    Range("M10:O10").Select
    ActiveSheet.Unprotect
    With Selection
        .HorizontalAlignment = xlGeneral
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = True
    End With
    ActiveCell.FormulaR1C1 = year
    Range("M10:O10").Select
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = True
    End With
    Selection.Font.Bold = True
    
    Sheets(year).Visible = True
    Worksheets(year).Activate
    Application.ScreenUpdating = True
    
End Function





Edited by - calbanese on 4/22/2003 11:19:20 AM

Checkbox On Excel VBA Form
I have a form in Excel VBA that has approximately 30 checkboxes. I wanted to know if there was a way to use a For...Each statement to check each checkbox and return the checkbox value (whether it is true or false). I have tried this but have had no luck. If you know if this is possible or if there is a better way, please let me know.

Thanks!!

VBA From Excel To IE - Check Checkbox
I got stuck again.

I'm trying to run a search on a website and then copy that data into Excel, use VBA to plug it from Excel into another app that I use. I suck at working with Internet Explorer though.

I need to select a check box in the IE browser before running the search. I've learned how to interact with buttons, but I don't know how do the same with a check box.

So far I've gotten as far as logging into the site, and I know how to interact with the "search" button, but I need to specify the search parameters by clicking a checkbox.

Here's the source from the site:


HTML Code:
<form name="csrMainMenuForm" method="post" action="/csr/mainMenuServeTable.do">
<input type="hidden" name="htmlTableDesc" value="csrSearchOrdersList">

<TABLE id=Table4 border=0>
<TR vAlign=top>
<TD>
<input type="checkbox" name="checkBoxList(OrderStatus)"
value="1" checked="checked">Entered<br>

<input type="checkbox" name="checkBoxList(OrderStatus)" value="2">Pending<br>
<input type="checkbox" name="checkBoxList(OrderStatus)" value="3">Assigned<br>
</TD>
I cut out some of the source between where the form starts, and the checkbox is, let me know if I removed any info that you need to help.

Thank you!

How Can I Add A CheckBox To A CommandBar In Excel
I want to add a CheckBox to a CommandBar (created by me )in Excel. I have the begginning of the source code below.

Dim xlapp as Excel.Application
Set xlapp=CreateObject("Excel.Application")
xlapp.visible=true

Dim xlbook as object
Set xlbook=xlapp.Workbooks.add

Dim cb as Object
Dim cbs as object

Set cbs=xlapp.CommandBars
Set cb=cbs.Add(,1,,True)
cb.visible=true

ok....so we created the Commandbars (in top)...how can we attach a checkbox?...
I need heellpppp.

Control Excel Checkbox From Vb
Hi,

I am trying to set a checkbox value in an excel workbook.

this is the code I have so far:

Set oExcel = CreateObject("Excel.Application")
Set oBook = xExcel.Workbooks.Add("c:formulier.xlt")

With oExcel.Application
.Visible = True
.Range("D4").Value = Me.txtDatAanvraag
.Range("d5").Value = Me.cmbMelder
.Range("d9").Value = Me.txtOmschrijving

.chkFI.Value = True
.Run "set_prio", CInt(cmbPrioExt)

End With
oBook.SaveAs "c:" & Me.cmbModule & Me.txtOmsKort & ".xls"


In this code I open excel fill 3 cells with data and then i want to set the checkbox. Either directly or by calling an macro in excel.

Both ways dont work.

Please Help,

Piet

Reading Value Of An Excel Checkbox
How do I read the value of an Excel checkbox? How would I write a value to an Excel checkbox?

VB -&gt; Excel: How To Update Checkbox?
From a vb application how do i check an excel checkbox?

thks.

Excel VBA - Checkbox Ques
Hello
I am a total beginner at this Excel VBA I suppose it's called. Anyway I just want to put checkboxes in a spreadsheet with the sole purpose of checking off when a task is performed. I put the checkboxes in the proper rows and columns but when I click on it it just highlights the checkbox. How do I get it to perform as a checkbox should, let me put a check in the box?

thanks for any help

Hal

"Hobson, do you know what I'm going to do"? "No I don't". "I'm going to take a bath". "Oh, shall I alert the media"? -- Dudley Moore and Sir John Geilgud from the movie Arthur



Edited by - Hal on 9/2/2003 3:11:29 PM

How Can I Add A CheckBox To A CommandBar In Excel
I want to add a CheckBox to a CommandBar (created by me )in Excel. I have the begginning of the source code below.

Dim xlapp as Excel.Application
Set xlapp=CreateObject("Excel.Application")
xlapp.visible=true

Dim xlbook as object
Set xlbook=xlapp.Workbooks.add

Dim cb as Object
Dim cbs as object

Set cbs=xlapp.CommandBars
Set cb=cbs.Add(,1,,True)
cb.visible=true

ok....so we created the Commandbars (in top)...how can we attach a checkbox?...
I need heellpppp.

 

CheckBox(s), Array(s), And Excel
hey,
Is there a way to create a set of checkboxes and form an array with them...like in VB??

Please indicate whether it's on a form or worksheet please!!!!!!!!!

and you could you show me how!!!!

thanks

VBA Excel Set Checkbox Values
Hi people. I am have trouble with something that should be simple and straight-forward. When a Workbook is open, I want to make sure the Value of some of my Checkboxes are False. I am trying to use this approach:
             With Sheet1.
                For i = 1 to 30
                   .CheckBox(i).Value = False
                Next i
             End With

It comes up with a Compile error: Method or Data Member not found.

How can I do this without listing all 30 CheckBox statements separately? DO I need to loop through the spreadsheet controls?

Thanks, DAVE

Checkbox In Excel 2003
I have made a to do list in Excel 2003.

I have a checkbox beside each task (in a separate cell). I want to check the checkbox and have the text in the task column to have a line through it (strikethrough)?

Not sure how to do this?

VBA Code For Copying And Pasting Data
Hmm, this is kind of hard to explain so bear with me.

I have created a userform with an "Add Details" command button to insert the information into rows on a worksheet (my master worksheet).

I am trying to find a way to assign a procedure to a "Search" command button that will copy the master worksheet data and insert it into a new worksheet that is read only but enable people to filter and sort at their leisure.

When the workbook is closed, this temporary new worksheet would be deleted or at least the data would be.

Any ideas? I've tried a couple of ways but unsuccessful so far.

Copying The Coloured Source Code?
I want to print out my source code as show in the visual basic enviroment, but i want to add it to Microsoft Word first. How do i keep the colouring of the text etc

thanks for any help

Problem Copying Files To CD From Code
I have an APP that needs to allow the user to save created files to a blank CD. Windows creates a folder to copy files to when a blank CD is inserted. The folder is labled (in my LapTop's case) "D:" and is visible in a VB6 DriveBox. However, when I try to use fso.CopyFile, it errors indicating that there is no disk in the drive (Error code 76 - Path not found).

How can I copy files to the temporary "write folder" created by Windows when a blank CD is inserted??

Thanks in advance!

0x34

Copying VB Code Into MS WORD In COLOUR
I would like to copy me VB code into MS word. This is not a problem with the simple copy and paste functions BUT i would also like it to "keep" its colour coding that VB has (like when we put code between VBCODE tags here in the forums it keeps the colour) is there a way to get word to do that also???

Copying File From One Drive To Another CODe?
Dear All,

I have an ADP File, back sql server,

i distributed the ADP to client on the network

now , when the clients open the ADP file i want to have a button on the switchboard when they click that the updated ADP file from server copy to their local drive , actually it overwrites the existing file,

is it possible if possible i want to have the code plz

thanks farzam


Outlook Vba Code Copying To Folder
Hi
I have got 3 Computers with OutLook on a LAN and i would love if someone could give me
VBA code for OUTLOOK that Copy's all e-mails (Outgoing and incoming) to one folder on
the server. If someone could send me the code i would appreciate it a lot...

DATAGRID - DISPLAYING BOOLEAN FIELD AS A CHECKBOX IN CODE
I am connecting to an Access Database using ADO. In code I am binding the DataGrid to the Recordset. One of the fields in the recordset is a boolean value and I want to display the values in this column as a checkbox, rather than as text.
I have been looking into using the Format Object, and have managed to get it to convert the boolean value to "True/False", but so far have not been able to get the checkbox displayed.
Can anyone help please? I am sure it can be done.

Create Dynamic Checkbox In Excel
I have a form where I need to create 'n' amount of checkboxes. The amount will depend on how many columns are filled in on the worksheet.

For example,

cell A1 = "There is something"
cell B1 = "There is something here"
cell C1 = "There is something here too"
...

I will need three checkboxes with the caption to read what is in the cell. I haven't worked with Excel VBA before so I am obviously having trouble.

Thanks for your help.

Excel Checkbox - Insert In Cell
How do I insert a checkbox into a specific cell reference on the Worksheet_Activate() event?

I believe it is something to do with the Cells.Left/Top/Right etc property but I cannot get it to work.

Any help would be greatly appreciated!!

Error When Copying A Worksheet Using MSDN Code
Why would this not work...


Code:
'Excel Objects
Public xlapp As Excel.Application
Public xlbook As Excel.Workbook
Public xlsheet As Excel.Worksheet

Set xlapp = CreateObject("Excel.Application")
Set xlbook = xlapp.Workbooks.Open(FileName:=App.Path & "Inventory.xls")
Set xlsheet = xlbook.Worksheets("Trucks")

xlbook.Worksheets("Truck(0)").Copy After:=Worksheets.Count

I also tried:


Code:
xlsheet = xlbook.Sheets("Truck(0)").Copy(After:=Worksheets.Count)

and


Code:
xlsheet = xlbook.Sheets("Truck(0)").Copy(After:=Worksheets.Count)

and I get the following errors:
"Copy method of worksheet class failed" and
"Unable to get the copy property of the worksheet class"

Thanks.

.Find && Copying Code Doesnt Seem To Work.
Hi

I have the following codes below.

I created a worksheet named "Names". From range(cells(3,1)) to cells(i,1), i wld like to key in new names. for range(cells(3,2)) to cells(i,2), is the new names' respective ages.

Using a form, I created two text boxes - txt_new_names & txt_agez. these txt-boxes are linked to range("Names!D4:E4").

before submitting the new names to the worksheet "Names", I would like to check whether the new names are repeated. ie, from cells(3,1) to cells(i,1) in comparasion with Range("Names!D4").

however, the code doesnt seem to work, may be due to my inexperience in using .find & etc. sorry.

thank you in advance for your kind assistance.


Code:
Private Sub cbo_new_name_submit_Click()

Dim i, ii As Integer
Dim R As Range, Item As Range
Dim FindAddress As String

i = Sheets("Names").Range("A63556").End(xlUp).Row

If Sheets("Names").Range("D4") <> vbNullString Then
With Sheets("Names").Cells(i, 1)
Set R = .Find(Range("D4").Value)
If Not R Is Nothing Then
MsgBox "Repetitive names - Try make the names more unique", vbOKOnly
txt_new_names = vbNullString
txt_age = vbNullString
txt_new_names.SetFocus

Else
For ii = 4 To i
If Cells(ii, 1) = vbNullString Then
Range("Names!D4:E4").Copy Cells(ii, 1)
MsgBox "You have submitted a new name!", vbOKOnly
Exit For
End If
Next
End If
Set R = Nothing
End With
End If

End Sub

Copying Code - Preserving Colour Scheme
Hi

I want to copy all the code I've written into MS Word, but I want to keep the colour scheme - e.g. blue keywords, green comments, etc. A standard copy/paste job is text-only and loses the colours, which I really want to keep. How can I do this?

Regards,
John

Copying Web Site Text Through Vb Code Issue.
I am opening a web page from vba Excel. I want to copy the entire page to the clip board. Then close the web site down. The problem is. How do I know if the web page has fully loaded before I Select All and Copy?

Copying HTML Code Into Front Page
I am trying to automatically paste some HTML instructions into Front Page from a VB app. My preference is to paste it in the "Edit" window of Front Page, not the "Source" Window.

When I do a

Clipboard.SetText "<image src= .....>"

And then paste it while in "Edit" view in Front Page. Unfortunately, when Front Page (and Outlook) are in "Edit" view and the recieve the paste it interprits it as literal text and not an HTML comand.
If I look at the "Source" view it has changed the "<" to "&lt;" to be a "less than" character instead of the beginning of an HTML instruction.

Does anyone know a way to copy an HTML command from a VB application so it can be pasted into an HTML editor like Front Page in "Edit" view?
Is there a way to identify the text which describes and HTML as some type of HTML command so when copied and pasted it is interpreted an and HTML command and not text??

Any help appreciated.

Copyright © 2005-08 www.BigResource.com, All rights reserved