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




Changing Name Of Item On Sheet - Need Help!


Let's say I run a copy routine and tell excel to copy Autoshape 2 - I now want it to paste that shape with a name I give it. By renaming it I'm able to identify it in the future.

What is the property that says Sheets(4).Shapes("Autoshape 2").name = ("Autoshape 4") ?

Thanks!

-----------------------------
looks like another bug...

Edited by - Shrout1 on 8/3/2004 12:45:08 PM




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Is It Possible To Copy The Item From Listview To Sheet?
Is it possible to copy the item from listview to sheet?

Changing To A Other Sheet In Excel
Dear vb users,

When I have started Excel in VB5, I want to change to an other sheet.

Code:
Dim XLsheet As Object

Set XLsheet = GetObject("c:ook.xls")
XLsheet.Application.Visible = True

Worksheets("test").Activate

In the last sentence occurred an error:

Method 'Worksheet' of object '_global' failed

What do I wrong?
Knows someone a other source?

Mary

Double Click And Item In A List Box To Open A Sheet
Is it possible (after populating a listbox) that if the user double clicks an item in a list box that eack item will open different excel spreadsheets (excel need not be running initially). Please remember that I am relatively new at this in any reply

Thank you

Problem In Macro Changing Sheet.
Hi,
I wish to use a macro when a sheet change (for example deleting a column).

I use this code.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim i As Integer
Dim a1 As Variant

For i = 1 To 6
a1 = Sheet1.Cells(1, 1)
If i = 4 Then
Sheet2.Cells(2, 2) = i
End If
Next i
End Sub

I wish that my loop end after 6 steps but if I delete a column on sheet1, the macro starts and after setting the value in sheet2, starts again at the beginning of the loop.
Is it possible to continue after Sheet2.Cells(2, 2) = i ?
Any idea?
Thanks in advance.
Regards,

Giovanni

Changing 2 Sheet Names By Input On One Tab?
Hi,

What I need to create is a pair of two sheets, that as they are copied and re-named the second sheet would be renamed by the first sheet's name with a prefix added.

So if there was a pair of sheets "sheet1" and "Psheet1", and they are copied at the same time and automatically renamed by excel to "sheet1 (2)" and "Psheet2 (2)" or the index of sheet(3) and sheet(4). The user could just rename the first “A” and the second would be renamed by the CONCATENATE function, adding P to the name of the first with resultant sheet name “PA”.

To complicate things, the users currently change the sheet name on the tab it-self, that name is inserted on a cell in the sheet by using the formula.

=MID(CELL("FileName",A1),FIND("]",(CELL("FileName",A1)))+1,999)

So there is actually no change on the work sheet to trigger the input. This is not a requirement but it would be nice that the only input would occur on the tab it self.


thanks,
Scott

Changing 2 Sheet Names By Input On One Tab?
Hi,

What I need to create is a pair of two sheets, that as they are copied and re-named the second sheet would be renamed by the first sheet's name with a prefix added.

So if there was a pair of sheets "sheet1" and "Psheet1", and they are copied at the same time and automatically renamed by excel to "sheet1 (2)" and "Psheet2 (2)" or the index of sheet(3) and sheet(4). The user could just rename the first “A” and the second would be renamed by the CONCATENATE function, adding P to the name of the first with resultant sheet name “PA”.

To complicate things, the users currently change the sheet name on the tab it-self, that name is inserted on a cell in the sheet by using the formula.

=MID(CELL("FileName",A1),FIND("]",(CELL("FileName",A1)))+1,999)

So there is actually no change on the work sheet to trigger the input. This is not a requirement but it would be nice that the only input would occur on the tab it self.


thanks,
Scott

Changing Properties Of Items Not On Sheet/form
I have set up a workbook so that once you log in with the correct name and password you can see certain sheets etc. However, what happens is that once you log in, the name of the command button changes from login to log out and a button for changing the password becomes visible.

However, at the momnet when you press the button, it changes the caption and makes the change pass button visible before it shows the form, so that if the user presses cancel then it gives the impression that they are logged in when in fact they aren't.

Is there any way whihc i can set the property of a command button on a sheet names "Welcome" from a form called "frmPass"

Any help would be appreciated

Thanks

Raj

Changing The Size Of Cells In A Protected Sheet
Hi,

I have a spreadsheet that I've created, which contains cells for comments that are of a fixed width and word-wrap enabled. The sheet is protected, however, so that people do not enter data into other columns.

The problem I have is that is someone populates the comments cell, but exceeds the size, the row height does not increase automatically... and cannot be increased manually by the end-user.

Any way round this in Excel?


Cheers,

Rob.

Changing Active Sheet By User Input
hi..
can any one help me.. how can i change the active sheet in an excel workbook if i want a user to input what sheet shoyld be active?
for example: if the user inputs/selects(through input box/combo box) a sheet named "boxer" then the sheet named boxer will become the active sheet..

please help.. thanks..

Excel, Changing 2 Sheet Names By Input On One Tab?
Hi,

What I need to create is a pair of two sheets, that as they are copied and re-named the second sheet would be renamed by the first sheet's name with a prefix added.

So if there was a pair of sheets "sheet1" and "Psheet1", and they are copied at the same time and automatically renamed by excel to "sheet1 (2)" and "Psheet2 (2)" or the index of sheet(3) and sheet(4). The user could just rename the first “A” and the second would be renamed by the CONCATENATE function, adding P to the name of the first with resultant sheet name “PA”.

To complicate things, the users currently change the sheet name on the tab it-self, that name is inserted on a cell in the sheet by using the formula.

=MID(CELL("FileName",A1),FIND("]",(CELL("FileName",A1)))+1,999)

So there is actually no change on the work sheet to trigger the input. This is not a requirement but it would be nice that the only input would occur on the tab it self.


thanks,
Scott

Changing The Value Of A Particular Item In A Collection?
Hi there folks! Now, suppose that I've a collection object like this :

Dim m_MyCol as New Collection



Private Sub Form_Load()
m_MyCol.Add "Item1"
End Sub[/ccode]


Private Sub Command1_Click()
'try to change the value of the item
'that we added in Form_Load()
m_MyCol.Item(1) = "ItemXeon!"
End Sub



But the thing is that the compiler gave me an error! I know it's this line that causes the error :

m_MyCol.Item(1) = "ItemXeon!"




In any case, how do I change the value of a particular item in a Collection?
Is it even possible? Thanks a lot! :--D

The lyric of the shattering roar of Xeon(Berserker Mode) :
BWOAR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Changing Value Of Item Selected In Listbox
How can I change the value of an item selected in listbox by clicking a command button?

I'm really looking to do something like this:

If an item is selected in ListBox1 and I press Command1 then make the selected item in ListBox1 the value of the selected item in Listbox1 minus 1 character...


If anyone can help I'd be greatly appreciative!

Changing Text On A Treeview Item
How would you change the text on and existing treeview item? I have a parent Item named "files" with text "Files (0 Files)". When a files is added as a child I would like it to read "Files (1 Files)" or what ever number after more files are added.

Listbox - Changing The Text Of Item
Hi I have included an example in the zip file to show what i'm trying to do:

I have three checkoption boxes - Apple, Banana and Orange and
a listbox (list1)

When the checkbox is ticked the item appears in the list1 listbox - All this works fine but now I need to do one more thing

If the items Apple, banana and orange are in the listbox I need to be able to change the item name into its colour for example on double click turn:

The text 'apple' into the text 'Green' or the text 'banana' into 'Yellow' or 'orange' into the text 'same as fruit' - but only the item selected and not all of them in one go

Because I want to be able to keep some items as the fruit name and change others to the colour of the fruit

Is this even possible and if so any advise on how to do it?

Changing The Forecolor Of An Item In An Imagecombo
I have noticed in the forum a number of posts saying you can change the forecolor of individual items in an imagecombo list. Unfortunately no-one says how to do it.

There is a font property for the control but not a font property or forecolor property for the individual items.

So how do you change the forecolor of individual items in an imagecombo list?

Changing Selected Item In A Tabstrip
In a tabstrip (Microsoft Common Controls 6) how can you change the selected item, without the user clicking on a tab?

Changing A List Box Item -resolved
I have a question for you. I am working on a piece of homework and am ripping my hair out and any help would be appreciated.

I have a list box. In part of my program I need to change the text of an item in the list box. For example, if it says:

Bill Gets

The user selects that name, and it appears in a text box. The user then makes the correction:

Bill Gates

and clicks a "Modify" menu option. I need to change Bill Gets into Bill Gates WITHOUT changing it's place in the list. Can you help me??? I'm having a brain cramp and can't get this simple little thing to happen.

HELP! Changing Item Appearance In Combo Box
I am trying to make some, but not all of the items in a combo box, bold. I need to create the same effect that the VB Code window has. In the events drop down when events have code behind them get a bold typeface but the ones without code have a regular typeface. I am not sure where to begin quite honestly. HELP.

Changing Listbox Item Font
All,

I would like to change the font color of a item in the list box without changing all other items. If I change the fore color of the list box as I add an item, when ever I change it back it changes for all items.

Is there a way to do this? I'm trying to differentiate the items in the list box when need be and not having any luck.

Thanks in advance

Rick C

Code I'm using

Code:
If Bucket = 0 Then
              lstRRd.ForeColor = &H80000001
Else
              lstRRd.ForeColor = &H80000012
End If

Changing Color Of A Particular Item In Listbox
Hi,
Can anybody suggest me how I can change the color of a particular item in a list box?
For example if a list box displaying 5 items and I want to change the color of Item no 2 and 5 then, how I can do it?

'Forecolor' property changes color of all items in listbox.

Is it possible by some means? Any Help/Suggestions?

Changing Caption On Right Justified Menu Item
Hi All,

I was able to right justify my right-most menu item using this post. Very cool!

Now I want to change the caption in that menu item from time to time. When I do, it loses it's right justification and scoots over next to the second to last menu item.

So, after changing the caption, I tried running the code (again) that moved it over in the first place, but it fails with error 1456.

I tried both the code from MS and the code down toward the bottom of the thread.

Any suggestions?

Thanks,
Bret Reece

Changing Selected Item In DataList Through Code?
I have a DataList control populated with an Adodc control, and I want to be able to select the first item in the list through code. Is there an easy way to do this? I found that moving in the ADO recordset doesn't affect which item is selected, and the .SelectedItem property which looked promising appears to be read only.


"Any fool can defend his or her mistakes; and most fools do." -- Dale Carnegie

Copy Item (Contacts) Without Changing LastModificationTime
Hello,

I try to copy contact item to other contact folder with using VBA;

Set newItem = myItem.Copy
newItem.Move myMoveFolder

but in this case " LastModificationTime " is changed after Move method.
Becasue I use " LastModificationTime " whether they are updated or not,
I want to move (copy) the items without any change.

Does anybody have idea?

Thanks.

How To Search Listbox For Item If Item Not Found Add Item?
Hi, lol man I cant find nothing today when I search the forum.

This my latest problem, How do I search a listbox for an item lets say "Game Over" And if the item is found the program does nothing, but if the item is not found it will add "Game Over"

Thanks Again

Coping A Formatted Sheet To Another Sheet: Problem With Hidden Rows
Ciao Gurus,

I have to copy an excel sheet with hidden rows to another sheet but the hidden rows are shown in the second sheet.
What or how can do?




 

How To Copy Data From One Sheet And Paste In A Sheet In Multiple Workbooks
I'm pretty new to excel vba and I have a macro that I'm working where the goal is to copy the date out of one sheet and past it in another sheet but in multiple workbooks in a folder. Any help would be appreciated. Thank you.

Sub Copy()
Application.EnableEvents = False
Application.DisplayAlerts = False
Dim i As Long
Dim sFolder As String
Dim fldr As Object
Dim FSO As Object
Dim Folder As Object
Dim file As Object
Dim Files As Object
Dim this As Workbook
Dim cnt As Long


    Set FSO = CreateObject("Scripting.FileSystemObject")


    Set this = ActiveWorkbook
    sFolder = "My Folder"
    If sFolder <> "" Then
        Set Folder = FSO.GetFolder(sFolder)


        Set Files = Folder.Files
        cnt = 1
        For Each file In Files
            If file.Type = "Microsoft Excel Worksheet" Then
                Workbooks.Open Filename:=file.Path
                With ActiveWindow
                    Range("A1:T12005").Select
                Selection.Copy
                With ActiveWorksheet
                    Sheets("Sheet 1").Activate
                Range("A1").Select
                ActiveSheet.Paste
                Selection.Interior.ColorIndex = xlNone
                ActiveWorkbook.Close SaveChanges:=True
                End With
                cnt = cnt + 1
                End If
                Next file

    End If ' sFolder <> ""

Application.EnableEvents = True
Application.DisplayAlerts = True
End Sub

Please post in the approriate sections of the site. This post has been moved to the VBA section from VBCity News





Edited by - vikramjb on 8/10/2006 10:01:31 PM

Concating Data Of More Than One Excel Sheet To One Sheet In The Same Work Book
Dear

I want to concate data of sheets in to another sheet in the same work book through VB.Please help me

Calculate Sheet Automatically Triggered By Sheet Activation
I am trying to automatically calculate a sheet when it is activated. Due to the slow speed of calculation (due to its size) of my excel spreadsheet I have turned calculation to manual. I have tried the following without success.

What am I doing wrong


Private Sub SheetActivate(ByVal Sh As Object)
Sh.Calculate
End Sub

How To Create A Macro To Copy Information In One Sheet To Another Sheet.
Hi All,
I was wondering how I can create a Macro to copy information that is on Sheet1 to SHeet2. The kink is that it only should copy the information in Column A when for example column C has a cell in it saying "YES". Please let me know at your earliest convience.

Thank You.
Mark

VB In Excel - Trying To Display Cells From Sheet To Sheet.
I'm going to go ahead and appologize for asking this, but I have no idea where to even start to search.

What I am trying to do is run and excel macro that will look for an specific enrty in column A. The entry it is searching for can happen multiple times. I want it to then display the information in columns B-F, respective to the the criteria in column A. (If the search is met in column A, that row I want displayed on a new sheet within the workbook)

I'm pretty sure that I can get info to display from one sheet to another. But my problem is how to run the loop so that it will search column A, and dipslay all respective information in columns B-F, if their column A meets the criteria. And stop when it gets to the bottom of the data, obviously.

Any help is so much appreciated. Also if you could just refer me to another section/topic, that will work too. Thanks in advance.

-g2

One Excel Sheet Monitoring Another Sheet's Events
I've written some macros that open an excel workbook and when an account number is typed into a user defined cell or cells the name associated with that account number is plugged into another user defined cell from the workbook the macros opened. I think my co-workers would find these macros very useful, the problem is none of them are very computer literate, and I don't want to have to go around and set these macros up on their excel workbooks. I would like to have these macros stored in a single sheet, but be triggered by the events of the sheets created by my co-workers without them having to insert any code into the sheets they create... just insert the sheet with the macros. Does anybody know if this is possible?? I appreciate any of the help I can get!!! I'm getting frustrated!!!

Copy Date From Sheet And Rename Sheet
Hi All,
I need help with a macro in excel. I thought I had it all working except for one thing. Every evening excel will open and run the macro. I am inserting a new sheet every day and renameing with that days date. My problem is when I recorded the macro the line of code that names the sheet inserted the days date that I recorded the macro. See below:
Sheets("Sheet2").Name = "2003 2 19"
How do I change the above line so that it will reference cells b3:d3 to rename my sheet.
Thanks.

Activating Code On One Sheet From A Button On Another Sheet.
I have a string of code that behaves exactly as I want it to on Sheet 1 of my workbook (Excel 02). Now, I want to excecute this code via a button on Sheet 2 of my workbook. I know this is probably simple, but I haven't found a solution. Here's the code:


Quote:




Private Sub CommandButton1_Click()
Dim varAnswer As String

varAnswer = MsgBox("This cannot be undone." & Chr(10) & Chr(10) & "Edits to this workbook my only be entered into your Data Sheet manually once the current data is compiled.", vbOKCancel)
If varAnswer = vbCancel Then
Exit Sub
End If
Dim Lrow As Long
Dim CalcMode As Long
Dim StartRow As Long
Dim EndRow As Long
With Application
CalcMode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With

With ActiveSheet
.DisplayPageBreaks = False
StartRow = 2
EndRow = 21
For Lrow = EndRow To StartRow Step -1
If IsError(.Cells(Lrow, "a").Value) Then
'Do nothing, This avoid a error if there is a error in the cell

ElseIf .Cells(Lrow, "A").Value <= " " Then .Rows(Lrow).Delete
'This will delete the row if the cell is empty

End If
Next
End With
With Application
.ScreenUpdating = True
.Calculation = CalcMode
End With

Range("A2:m21").Select
Selection.copy

End Sub




Thanks in advance.

Tring To Find Items On One Sheet On Another Sheet, Then Ect..............
Code:Private Sub cmdCompleted_Click()
    Dim strProjects
    Dim c
    Dim firstAddress
    Dim Count1
        
    strProjects = lstProjects.List(lstProjects.ListIndex)
    
    With Worksheets("Job Location and Status").Range("a1:a500")
        Set c = .Find(strProjects, LookIn:=xlValues)
        If Not c Is Nothing Then
            firstAddress = c.Address
            Do
                c.Interior.Pattern = xlPatternGray50
                Set c = .FindNext(c)
            Loop While Not c Is Nothing And c.Address <> firstAddress
        End If
    End With
    
End Sub

The code above will find the selected line (from a list box that is on one sheet) on "Job Location and Status" and the A# cell gray. (I have been piecing this code together from the F1 button.) What I want it to do is find like it does, but instead of doing something with the matching cell, I want it to change a cell in the same row. EX. If it finds that cell A7 matches, I want to place a value in C7.

Does this make sense?

Thanks

Linking Rows From Sheet To Sheet Within A Workbook ?
Hello all
           I am trying to make a workbook easier to use. The workbook has 4 different worksheets & over 200 rows, each row is a different project. At the moment I have click buttons to change from sheet to sheet

on sheet 1 row 10 is one project, sheet's 2,3 & 4 row 10 contain information relating to the same project. Is it possible to wright some code that will link the rows form one sheet to the next and it bring the active row to the top of the page.

thanks for your help
        Tom

Need VB Code To Insert A Row For A Subscripted Line In Excel & Code To Search For Amounts On One Sheet And Apply Them To Certain Area On Another Sheet
I am in the process of developing an Excel spreadsheet and need assistance
in adding visual basic code to automate it.

The first thing I am trying to do is to create a macro where a user can
click on a certain button, and the program will insert a row at a specific
row and will copy all formulas associated with the row above it. For
instance, if you have a spreadsheet that has 10 rows and 3 columns in it,
you can insert a subscript line below row 5 and call it 5.1. When the
subscripted row "5.1" is added, it will include the same formulas as in row
5, which would add columns 1 and 2 in column 3.

The second thing I am trying to do is have some code that if a user enters
information on Sheet B that needs to also be included on Sheet A, the code
will search Sheet B to see it an entry made on Sheet B should be carried to
a particular row in Sheet A.

I would greatly appreciate any feedback anyone can give me regarding this.
Thanks in advance.

Rename A Sheet And Sheet Properties
Simple on but I cannot figure it out, thanks in advance

I have software the exports products to excel and the file name is date.xls and the sheet name is a random number. what i need to do is rename the sheet, sheet1 and the properties(name) to sheet1. I then need to add another sheet, sheet2 and the name the properties(name) to sheet2.

I just cannot get it to rename the sheet properties(name). I have looked through the web and cannot find how to do it.

thanks

Prevent Add Sheet If The Sheet Is Already Exits
I have a macro that will add sheets (costing,T&A,order confirmations) into activeworkbooks (marketing.xls). If the sheets (costing (2), T&A (2),order confirmations (2)) are already exits, then will prompt user a msg, if not will create the sheets for them.
but when I run the macro, there will created 8 set of the three sheets.
pls help...


For Each ws In ActiveWorkbook.Worksheets
If ws.Name Like "Costing (2)" Then
MsgBox "You must save your current costing before create another costing"
Else
Worksheets("Costing").Visible = True
Worksheets("T&A").Visible = True
Worksheets("Order Confirmations").Visible = True

Sheets(Array("Costing", "T&A", "Order Confirmations")).Select
Sheets("Order Confirmations").Activate
Sheets(Array("Costing", "T&A", "Order Confirmations")).Copy Before:=Workbooks( _
"Marketing.xls").Sheets(2)
End If
Next ws

Worksheets("Costing").Visible = xlVeryHidden
Worksheets("T&A").Visible = xlVeryHidden
Worksheets("Order Confirmations").Visible = xlVeryHidden

Hide Sheet In Sheet List
I use a little procedure to create a pop-up worksheet selector. There are a couple of sheets that I would like left out of the list. Can anyone help edit this snippet.

Code:
Set OriginalSheet = ActiveSheet
ShtCnt = ActiveWorkbook.Sheets.Count
ReDim SheetData(1 To ShtCnt, 1 To 1)
ShtNum = 1
For Each sht In ActiveWorkbook.Sheets
If sht.Name = ActiveSheet.Name Then _
ListPos = ShtNum - 1
SheetData(ShtNum, 1) = sht.Name
ShtNum = ShtNum + 1
Next sht
With ListBox1
.ColumnWidths = "100 pt;50 pt"
.List = SheetData
.ListIndex = ListPos
End With
Set OriginalSheet = ActiveSheet
ShtCnt = ActiveWorkbook.Sheets.Count
ReDim SheetData(1 To ShtCnt, 1 To 1)
ShtNum = 1
For Each sht In ActiveWorkbook.Sheets
If sht.Name = ActiveSheet.Name Then _
ListPos = ShtNum - 1
SheetData(ShtNum, 1) = sht.Name
ShtNum = ShtNum + 1
Next sht
With ListBox1
.ColumnWidths = "100 pt;50 pt"
.List = SheetData
.ListIndex = ListPos
End With

Cheers

A Sheet's Number Or A Sheet's Name Using A Macro
Hi,
I have searched for a way to let a macro copy a sheet and move it to (before) a special sheet - let's call it "Special".

The code Sheets("Origin").Copy Before:=Sheets("Special") worked fine for some days but not any longer.

When a macro records this it writes
Sheets("Origin").Copy Before:=Sheets(4)
where 4 stands for sheet number 4 (even if sheet 3 is hidden). Sheet number 5 is then "Special".

It is a complicated to use the sheets' numbers instead of the names I have given them. Any move of a sheet makes the macro not work as intended and I also have the intention to let a macro copy and rename sheets so keeping track of the numbers will be tough.

Do you know a way how solve this? Thanks in advance!





Edited by - benes on 12/10/2006 9:09:09 AM

Fill Cells From Sheet To Other Sheet
i have this userform MODIFICHE.
sheet REPORT is filled from a value into variuos textbox. Work fine....
sheet cartel1 is the data base of record.
I would want to fill during the scroll vevent into REPORT the list of value refered the actual record show into userform.
Example:
I scroll the record actually, show is ARNESE CIRO, i would want to fill the sheet REPORT with all line refred to ARNESE CIRO into REPORT started from line 38.
Note the unique id for each record is into column D (CERTIF)

here the file...
http://www.mytempdir.com/407468

Importing Data From One Closed Excel Sheet Into Another Open Excel Sheet
Dear all,
   I am VBA newbie ... I need your help in importing the data froma closed excel document into another excel document.

Please help.
Cheers
Vivek

Click Item In Listview Then Show That Item In Combo As Index = 0
Hi guys,

I have a listview (lvwUserPunchedOut) that is populated with records in a database (persons first name in one column and last name in the second column), what I am looking to do is if I select a persons name by clicking on it in the listview on frmMain, and then bring up frmSearchCriteria, i would like to show that selected name in the combobox as default (cboEmployee.ListIndex = 0) on frmSearchCriteria (the combobox is sorted = True and is also populated with first name and last name of the person)

How would this be done? Hope I make sense. Thanks in advance.

ComboBox List/add Item, If Item Exists, Dont Add It Again!
Dudes and Dudeesses I need help!

I have a problem with a combobox within a form. I'm scanning down the spreadsheet for values and asking a combobox to .additem, however, the same value may appear twice whilst scanning down. Is there an if statement that will look and check the combobox to see if it is already added, if so dont add it again, if not, add it?

as below,

Code:
combobox.AddItem "Hotmail"
combobox.AddItem "Yahoo"
combobox.AddItem "Hotmail"
Hotmail will be added twice, how can I stop that?

If worst comes to the worst, I can sort it out with a long winded method, but I'm hoping theres a quicker way.

Thanks for all your help

Array Handling, Adding Item, Deleting Item
Hello,

I was going to build a "buffer" and thought array would be a suitable way.
when the form loads the ArrayStart is set to 0

when data is coming in it is added to the array:

MyArray(ArrayStart)= data
ArrayStart= ArrayStart + 1


Now i would like to find out whether there is any data in this array
if there is im doing something with that data

but then i would like to simply delete that data from the array

how do do this?

Pointing Mouse At Some Item On Form Causes Info About This Item To Appear???can This
my question is that when you point the mouse at some item on the form you get some info about this item to appear, like on html page or for example when you point to the message icons in vbforum page like the lightbulb symbol it tells you that it is a lightbulb...can this be done in visual basic....

Select Item In ListBox1 And Corresponding Item In ListBox2 Is Also Selected
Hi,
Hi I have two Listboxes list1 has lets say Firstname in List1 and List2 has surnames.
How do I select an item in List1 and have it's corresponding item in List2 selected as well?

So if I select Item 6 in List1, I want item6 in List2 to be selected too.

Ken

Removing An Item From A ListBox By Clicking The Item
Hi, How do you remove an item from a ListBox by simply clicking the item u want to be removed?

This is the code i tried but it doesnt work:

Private Sub list1_Click()
Dim n As Long
Dim ncount As Long

ncount = List1.ListCount - 0
For n = 0 To ncount
List1.RemoveItem (n)
Next
End Sub

Any ideas?


-Flaw

Single Item List Box (item Not Really Selecting)
Application=Access2002

The following code has worked for me in the past but won't now for some reason.
I have a private function and/or subs that performs a few simple operations such as setting listbox rowsources and simple math functions on a form. The queries set as rowsource use criteria from other single item listboxes.
Now, for some reason, the queries won't return values until the previously .selected(0) = true (single item) list boxes have been clicked on.
Problem has only been in creating a new form. Perhaps the problem did not occur in older created forms due to compatibility?


Private Sub fraEWTo_AfterUpdate()

[Edited]
    lstRotorHoursPriorTo.RowSource = "qryRotorSwapHoursTotTo" 'gets hoursprior from tblRotors
    lstRotorHoursPriorTo.Selected(0) = True ' This is one place where the problem seems to exist, the control does not function until it has been clicked on via mouse.

    LstClockInTo.RowSource = "qryRotorSwapRAHoursIPTo"
    LstClockInTo.Selected(0) = True

    txtRACHIPTo.Locked = False
    txtRACHIPTo.Value = txtClockHoursTo.Value - lstClockInTo.Value 'nor will this until the lstClockInTo box has been manually selected


A Mechanic in a Programmers shoes
Thanks




Edited by - greenfch on 12/7/2005 11:22:52 AM

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