Common Function for getting userform information

Hi,

My macro has a lot of userform and multi listbox within userform (each
userform has unique name). how can I use a function to get the
selected items in different listbox?

eg.
fmMyPlot.lb_Prof_xAxis
fmMyPlot.lb_Prof_y1Axis

fmMyPlot.lb_Std_Gp
fmMyPlot.lb_Std_Series

fmMyTemplate.lb_temp1
fmMyTemplate.lb_temp2

any ideas? thx
0
Danny
12/24/2009 9:26:48 AM
excel.programming 6508 articles. 2 followers. Follow

6 Replies
639 Views

Similar Articles

[PageSpeed] 44

Sub Test()
Dim i As Long, n As Long
Dim s As String
Dim arr
Dim lb As MSForms.ListBox

    Set lb = UserForm1.ListBox1

    n = getSelected(lb, arr)

    If n = -1 Then
        s = "no items selected"
    Else
        s = arr(0)
        For i = 1 To UBound(arr)
            s = s & vbCr & arr(i)
        Next
    End If

    MsgBox s

End Sub

Function getSelected(lb As MSForms.ListBox, arr) As Long
Dim i As Long, idx As Long

    idx = -1

    ReDim arr(0 To lb.ListCount - 1)
    For i = 0 To lb.ListCount - 1
        If lb.Selected(i) Then
            idx = idx + 1
            arr(idx) = lb.List(i)
        End If
    Next
    If idx >= 0 And idx < UBound(arr) Then
        ReDim Preserve arr(0 To idx)
    End If
    getSelected = idx

End Function

Regards,
Peter T

"Danny" <dannypctang@gmail.com> wrote in message 
news:98f44296-fe48-4652-a999-559d9d032784@z10g2000prh.googlegroups.com...
> Hi,
>
> My macro has a lot of userform and multi listbox within userform (each
> userform has unique name). how can I use a function to get the
> selected items in different listbox?
>
> eg.
> fmMyPlot.lb_Prof_xAxis
> fmMyPlot.lb_Prof_y1Axis
>
> fmMyPlot.lb_Std_Gp
> fmMyPlot.lb_Std_Series
>
> fmMyTemplate.lb_temp1
> fmMyTemplate.lb_temp2
>
> any ideas? thx 


0
Peter
12/24/2009 10:26:08 AM
On Dec 24, 6:26=A0pm, "Peter T" <peter_t@discussions> wrote:
> Sub Test()
> Dim i As Long, n As Long
> Dim s As String
> Dim arr
> Dim lb As MSForms.ListBox
>
> =A0 =A0 Set lb =3D UserForm1.ListBox1
>
> =A0 =A0 n =3D getSelected(lb, arr)
>
> =A0 =A0 If n =3D -1 Then
> =A0 =A0 =A0 =A0 s =3D "no items selected"
> =A0 =A0 Else
> =A0 =A0 =A0 =A0 s =3D arr(0)
> =A0 =A0 =A0 =A0 For i =3D 1 To UBound(arr)
> =A0 =A0 =A0 =A0 =A0 =A0 s =3D s & vbCr & arr(i)
> =A0 =A0 =A0 =A0 Next
> =A0 =A0 End If
>
> =A0 =A0 MsgBox s
>
> End Sub
>
> Function getSelected(lb As MSForms.ListBox, arr) As Long
> Dim i As Long, idx As Long
>
> =A0 =A0 idx =3D -1
>
> =A0 =A0 ReDim arr(0 To lb.ListCount - 1)
> =A0 =A0 For i =3D 0 To lb.ListCount - 1
> =A0 =A0 =A0 =A0 If lb.Selected(i) Then
> =A0 =A0 =A0 =A0 =A0 =A0 idx =3D idx + 1
> =A0 =A0 =A0 =A0 =A0 =A0 arr(idx) =3D lb.List(i)
> =A0 =A0 =A0 =A0 End If
> =A0 =A0 Next
> =A0 =A0 If idx >=3D 0 And idx < UBound(arr) Then
> =A0 =A0 =A0 =A0 ReDim Preserve arr(0 To idx)
> =A0 =A0 End If
> =A0 =A0 getSelected =3D idx
>
> End Function
>
> Regards,
> Peter T
>
> "Danny" <dannypct...@gmail.com> wrote in message
>
> news:98f44296-fe48-4652-a999-559d9d032784@z10g2000prh.googlegroups.com...
>
>
>
> > Hi,
>
> > My macro has a lot of userform and multi listbox within userform (each
> > userform has unique name). how can I use a function to get the
> > selected items in different listbox?
>
> > eg.
> > fmMyPlot.lb_Prof_xAxis
> > fmMyPlot.lb_Prof_y1Axis
>
> > fmMyPlot.lb_Std_Gp
> > fmMyPlot.lb_Std_Series
>
> > fmMyTemplate.lb_temp1
> > fmMyTemplate.lb_temp2
>
> > any ideas? thx- Hide quoted text -
>
> - Show quoted text -


Hi, Thanks.

i tried to modify the second part, but failed.
mainly, the array changed from Array(x) to Array(x,2)

++++++++++++++++++
Option Base 1
Function getSelected(lb As MSForms.ListBox, arr) As Long
Dim i As Long, idx As Long

    idx =3D 0
    ReDim arr(1 To lb.ListCount, 2)
    For i =3D 1 To lb.ListCount
        If lb.Selected(i - 1) =3D True Then
            idx =3D idx + 1
            arr(idx, 1) =3D lb.List(i - 1)
            arr(idx, 2) =3D i
        End If
    Next
    If idx >=3D 1 And idx < UBound(arr) Then
        ReDim Preserve arr(1 To idx)
    End If
    getSelected =3D idx

End Function
++++++++++++++++++
0
Danny
12/24/2009 7:42:01 PM
From the Remarks section of the help file for ReDim...

"If you use the Preserve keyword, you can resize
 only the last array dimension and you can't change
 the number of dimensions at all."

-- 
Rick (MVP - Excel)


"Danny" <dannypctang@gmail.com> wrote in message 
news:685853e7-a1a8-4d20-94ac-0534a192bc29@m7g2000prd.googlegroups.com...
On Dec 24, 6:26 pm, "Peter T" <peter_t@discussions> wrote:
> Sub Test()
> Dim i As Long, n As Long
> Dim s As String
> Dim arr
> Dim lb As MSForms.ListBox
>
> Set lb = UserForm1.ListBox1
>
> n = getSelected(lb, arr)
>
> If n = -1 Then
> s = "no items selected"
> Else
> s = arr(0)
> For i = 1 To UBound(arr)
> s = s & vbCr & arr(i)
> Next
> End If
>
> MsgBox s
>
> End Sub
>
> Function getSelected(lb As MSForms.ListBox, arr) As Long
> Dim i As Long, idx As Long
>
> idx = -1
>
> ReDim arr(0 To lb.ListCount - 1)
> For i = 0 To lb.ListCount - 1
> If lb.Selected(i) Then
> idx = idx + 1
> arr(idx) = lb.List(i)
> End If
> Next
> If idx >= 0 And idx < UBound(arr) Then
> ReDim Preserve arr(0 To idx)
> End If
> getSelected = idx
>
> End Function
>
> Regards,
> Peter T
>
> "Danny" <dannypct...@gmail.com> wrote in message
>
> news:98f44296-fe48-4652-a999-559d9d032784@z10g2000prh.googlegroups.com...
>
>
>
> > Hi,
>
> > My macro has a lot of userform and multi listbox within userform (each
> > userform has unique name). how can I use a function to get the
> > selected items in different listbox?
>
> > eg.
> > fmMyPlot.lb_Prof_xAxis
> > fmMyPlot.lb_Prof_y1Axis
>
> > fmMyPlot.lb_Std_Gp
> > fmMyPlot.lb_Std_Series
>
> > fmMyTemplate.lb_temp1
> > fmMyTemplate.lb_temp2
>
> > any ideas? thx- Hide quoted text -
>
> - Show quoted text -


Hi, Thanks.

i tried to modify the second part, but failed.
mainly, the array changed from Array(x) to Array(x,2)

++++++++++++++++++
Option Base 1
Function getSelected(lb As MSForms.ListBox, arr) As Long
Dim i As Long, idx As Long

    idx = 0
    ReDim arr(1 To lb.ListCount, 2)
    For i = 1 To lb.ListCount
        If lb.Selected(i - 1) = True Then
            idx = idx + 1
            arr(idx, 1) = lb.List(i - 1)
            arr(idx, 2) = i
        End If
    Next
    If idx >= 1 And idx < UBound(arr) Then
        ReDim Preserve arr(1 To idx)
    End If
    getSelected = idx

End Function
++++++++++++++++++ 

0
Rick
12/24/2009 7:53:27 PM
On Dec 25, 3:53=A0am, "Rick Rothstein"
<rick.newsNO.S...@NO.SPAMverizon.net> wrote:
> From the Remarks section of the help file for ReDim...
>
> "If you use the Preserve keyword, you can resize
> =A0only the last array dimension and you can't change
> =A0the number of dimensions at all."
>
> --
> Rick (MVP - Excel)
>
> "Danny" <dannypct...@gmail.com> wrote in message
>
> news:685853e7-a1a8-4d20-94ac-0534a192bc29@m7g2000prd.googlegroups.com...
> On Dec 24, 6:26 pm, "Peter T" <peter_t@discussions> wrote:
>
>
>
>
>
> > Sub Test()
> > Dim i As Long, n As Long
> > Dim s As String
> > Dim arr
> > Dim lb As MSForms.ListBox
>
> > Set lb =3D UserForm1.ListBox1
>
> > n =3D getSelected(lb, arr)
>
> > If n =3D -1 Then
> > s =3D "no items selected"
> > Else
> > s =3D arr(0)
> > For i =3D 1 To UBound(arr)
> > s =3D s & vbCr & arr(i)
> > Next
> > End If
>
> > MsgBox s
>
> > End Sub
>
> > Function getSelected(lb As MSForms.ListBox, arr) As Long
> > Dim i As Long, idx As Long
>
> > idx =3D -1
>
> > ReDim arr(0 To lb.ListCount - 1)
> > For i =3D 0 To lb.ListCount - 1
> > If lb.Selected(i) Then
> > idx =3D idx + 1
> > arr(idx) =3D lb.List(i)
> > End If
> > Next
> > If idx >=3D 0 And idx < UBound(arr) Then
> > ReDim Preserve arr(0 To idx)
> > End If
> > getSelected =3D idx
>
> > End Function
>
> > Regards,
> > Peter T
>
> > "Danny" <dannypct...@gmail.com> wrote in message
>
> >news:98f44296-fe48-4652-a999-559d9d032784@z10g2000prh.googlegroups.com..=
..
>
> > > Hi,
>
> > > My macro has a lot of userform and multi listbox within userform (eac=
h
> > > userform has unique name). how can I use a function to get the
> > > selected items in different listbox?
>
> > > eg.
> > > fmMyPlot.lb_Prof_xAxis
> > > fmMyPlot.lb_Prof_y1Axis
>
> > > fmMyPlot.lb_Std_Gp
> > > fmMyPlot.lb_Std_Series
>
> > > fmMyTemplate.lb_temp1
> > > fmMyTemplate.lb_temp2
>
> > > any ideas? thx- Hide quoted text -
>
> > - Show quoted text -
>
> Hi, Thanks.
>
> i tried to modify the second part, but failed.
> mainly, the array changed from Array(x) to Array(x,2)
>
> ++++++++++++++++++
> Option Base 1
> Function getSelected(lb As MSForms.ListBox, arr) As Long
> Dim i As Long, idx As Long
>
> =A0 =A0 idx =3D 0
> =A0 =A0 ReDim arr(1 To lb.ListCount, 2)
> =A0 =A0 For i =3D 1 To lb.ListCount
> =A0 =A0 =A0 =A0 If lb.Selected(i - 1) =3D True Then
> =A0 =A0 =A0 =A0 =A0 =A0 idx =3D idx + 1
> =A0 =A0 =A0 =A0 =A0 =A0 arr(idx, 1) =3D lb.List(i - 1)
> =A0 =A0 =A0 =A0 =A0 =A0 arr(idx, 2) =3D i
> =A0 =A0 =A0 =A0 End If
> =A0 =A0 Next
> =A0 =A0 If idx >=3D 1 And idx < UBound(arr) Then
> =A0 =A0 =A0 =A0 ReDim Preserve arr(1 To idx)
> =A0 =A0 End If
> =A0 =A0 getSelected =3D idx
>
> End Function
> ++++++++++++++++++- Hide quoted text -
>
> - Show quoted text -

Hi, Thanks.

then i will separate this set array to 2.

br,
Danny
0
Danny
12/25/2009 8:56:10 AM
"Danny" <dannypctang@gmail.com> wrote in message 
news:685853e7-a1a8-4d20-94ac-0534a192bc29@m7g2000prd.googlegroups.com...
On Dec 24, 6:26 pm, "Peter T" <peter_t@discussions> wrote:
> Sub Test()
> Dim i As Long, n As Long
> Dim s As String
> Dim arr
> Dim lb As MSForms.ListBox
>
> Set lb = UserForm1.ListBox1
>
> n = getSelected(lb, arr)
>
> If n = -1 Then
> s = "no items selected"
> Else
> s = arr(0)
> For i = 1 To UBound(arr)
> s = s & vbCr & arr(i)
> Next
> End If
>
> MsgBox s
>
> End Sub
>
> Function getSelected(lb As MSForms.ListBox, arr) As Long
> Dim i As Long, idx As Long
>
> idx = -1
>
> ReDim arr(0 To lb.ListCount - 1)
> For i = 0 To lb.ListCount - 1
> If lb.Selected(i) Then
> idx = idx + 1
> arr(idx) = lb.List(i)
> End If
> Next
> If idx >= 0 And idx < UBound(arr) Then
> ReDim Preserve arr(0 To idx)
> End If
> getSelected = idx
>
> End Function
>
> Regards,
> Peter T
>
> "Danny" <dannypct...@gmail.com> wrote in message
>
> news:98f44296-fe48-4652-a999-559d9d032784@z10g2000prh.googlegroups.com...
>
>
>
> > Hi,
>
> > My macro has a lot of userform and multi listbox within userform (each
> > userform has unique name). how can I use a function to get the
> > selected items in different listbox?
>
> > eg.
> > fmMyPlot.lb_Prof_xAxis
> > fmMyPlot.lb_Prof_y1Axis
>
> > fmMyPlot.lb_Std_Gp
> > fmMyPlot.lb_Std_Series
>
> > fmMyTemplate.lb_temp1
> > fmMyTemplate.lb_temp2
>
> > any ideas? thx- Hide quoted text -
>
> - Show quoted text -


Hi, Thanks.

i tried to modify the second part, but failed.
mainly, the array changed from Array(x) to Array(x,2)

++++++++++++++++++
Option Base 1
Function getSelected(lb As MSForms.ListBox, arr) As Long
Dim i As Long, idx As Long

    idx = 0
    ReDim arr(1 To lb.ListCount, 2)
    For i = 1 To lb.ListCount
        If lb.Selected(i - 1) = True Then
            idx = idx + 1
            arr(idx, 1) = lb.List(i - 1)
            arr(idx, 2) = i
        End If
    Next
    If idx >= 1 And idx < UBound(arr) Then
        ReDim Preserve arr(1 To idx)
    End If
    getSelected = idx

End Function
++++++++++++++++++

========================================================


As Rick says you can only Redim Preserve the last dimension. Here's same 
again adapted to a get selected items from a two column multiselect Listbox

Sub Test()
Dim i As Long, n As Long
Dim s As String
Dim arr
Dim lbx As MSForms.ListBox

    Set lbx = UserForm1.ListBox1 ' assumes 2-columns

    n = getSelected(lbx, arr)

    If n = -1 Then
        s = "no items selected"
    Else
        s = arr(0, 0) & vbTab & arr(1, 0)
        For i = 1 To UBound(arr, 2)
            s = s & vbCr & arr(0, i) & vbTab & arr(1, i)
        Next
    End If

    MsgBox s

End Sub

Function getSelected(lbx As MSForms.ListBox, arr) As Long
Dim i As Long, idx As Long
' to get an array of seleted items from
' a Multiselect, 2-column ListBox

    idx = -1

    ReDim arr(0 To 1, 0 To lbx.ListCount - 1)
    For i = 0 To lbx.ListCount - 1
        If lbx.Selected(i) Then
            idx = idx + 1
            arr(0, idx) = lbx.List(i, 0)
            arr(1, idx) = lbx.List(i, 1)
        End If
    Next
    If idx >= 0 And idx < UBound(arr) Then
        ReDim Preserve arr(0 To 1, 0 To idx)
    End If
    getSelected = idx

End Function


This is all zero-base, adapt if you particularly want to change to one-base.

Regards,
Peter T 


0
Peter
12/26/2009 11:27:42 AM
"Peter T" <peter_t@discussions> wrote in message 
news:uRv%23s5hhKHA.1460@TK2MSFTNGP06.phx.gbl...
>
> "Danny" <dannypctang@gmail.com> wrote in message 
> news:685853e7-a1a8-4d20-94ac-0534a192bc29@m7g2000prd.googlegroups.com...
> On Dec 24, 6:26 pm, "Peter T" <peter_t@discussions> wrote:
>> Sub Test()
>> Dim i As Long, n As Long
>> Dim s As String
>> Dim arr
>> Dim lb As MSForms.ListBox
>>
>> Set lb = UserForm1.ListBox1
>>
>> n = getSelected(lb, arr)
>>
>> If n = -1 Then
>> s = "no items selected"
>> Else
>> s = arr(0)
>> For i = 1 To UBound(arr)
>> s = s & vbCr & arr(i)
>> Next
>> End If
>>
>> MsgBox s
>>
>> End Sub
>>
>> Function getSelected(lb As MSForms.ListBox, arr) As Long
>> Dim i As Long, idx As Long
>>
>> idx = -1
>>
>> ReDim arr(0 To lb.ListCount - 1)
>> For i = 0 To lb.ListCount - 1
>> If lb.Selected(i) Then
>> idx = idx + 1
>> arr(idx) = lb.List(i)
>> End If
>> Next
>> If idx >= 0 And idx < UBound(arr) Then
>> ReDim Preserve arr(0 To idx)
>> End If
>> getSelected = idx
>>
>> End Function
>>
>> Regards,
>> Peter T
>>
>> "Danny" <dannypct...@gmail.com> wrote in message
>>
>> news:98f44296-fe48-4652-a999-559d9d032784@z10g2000prh.googlegroups.com...
>>
>>
>>
>> > Hi,
>>
>> > My macro has a lot of userform and multi listbox within userform (each
>> > userform has unique name). how can I use a function to get the
>> > selected items in different listbox?
>>
>> > eg.
>> > fmMyPlot.lb_Prof_xAxis
>> > fmMyPlot.lb_Prof_y1Axis
>>
>> > fmMyPlot.lb_Std_Gp
>> > fmMyPlot.lb_Std_Series
>>
>> > fmMyTemplate.lb_temp1
>> > fmMyTemplate.lb_temp2
>>
>> > any ideas? thx- Hide quoted text -
>>
>> - Show quoted text -
>
>
> Hi, Thanks.
>
> i tried to modify the second part, but failed.
> mainly, the array changed from Array(x) to Array(x,2)
>
> ++++++++++++++++++
> Option Base 1
> Function getSelected(lb As MSForms.ListBox, arr) As Long
> Dim i As Long, idx As Long
>
>    idx = 0
>    ReDim arr(1 To lb.ListCount, 2)
>    For i = 1 To lb.ListCount
>        If lb.Selected(i - 1) = True Then
>            idx = idx + 1
>            arr(idx, 1) = lb.List(i - 1)
>            arr(idx, 2) = i
>        End If
>    Next
>    If idx >= 1 And idx < UBound(arr) Then
>        ReDim Preserve arr(1 To idx)
>    End If
>    getSelected = idx
>
> End Function
> ++++++++++++++++++
>
> ========================================================
>
>
> As Rick says you can only Redim Preserve the last dimension. Here's same 
> again adapted to a get selected items from a two column multiselect 
> Listbox
>
> Sub Test()
> Dim i As Long, n As Long
> Dim s As String
> Dim arr
> Dim lbx As MSForms.ListBox
>
>    Set lbx = UserForm1.ListBox1 ' assumes 2-columns
>
>    n = getSelected(lbx, arr)
>
>    If n = -1 Then
>        s = "no items selected"
>    Else
>        s = arr(0, 0) & vbTab & arr(1, 0)
>        For i = 1 To UBound(arr, 2)
>            s = s & vbCr & arr(0, i) & vbTab & arr(1, i)
>        Next
>    End If
>
>    MsgBox s
>
> End Sub
>
> Function getSelected(lbx As MSForms.ListBox, arr) As Long
> Dim i As Long, idx As Long
> ' to get an array of seleted items from
> ' a Multiselect, 2-column ListBox
>
>    idx = -1
>
>    ReDim arr(0 To 1, 0 To lbx.ListCount - 1)
>    For i = 0 To lbx.ListCount - 1
>        If lbx.Selected(i) Then
>            idx = idx + 1
>            arr(0, idx) = lbx.List(i, 0)
>            arr(1, idx) = lbx.List(i, 1)
>        End If
>    Next
>    If idx >= 0 And idx < UBound(arr) Then
>        ReDim Preserve arr(0 To 1, 0 To idx)
>    End If
>    getSelected = idx
>
> End Function
>
>
> This is all zero-base, adapt if you particularly want to change to 
> one-base.
>
> Regards,
> Peter T
==========================================================

Looks like I misunderstood the purpose of your 2d array, I assumed it was 
because you have 2-column Listboxes. But reading again I see you have this -

            arr(idx, 1) = lb.List(i - 1)
            arr(idx, 2) = i

I don't know what you are attempting to do and suspect my revised demo is 
not what you want.

Regards,
Peter T 


0
Peter
12/26/2009 11:35:49 AM
Reply:

Similar Artilces:

Getting Chart Point info
Hi - I am building a "drill down" chart. When you click on one of the points of the chart, it takes you to anohter chart based on the informaiton on the point. I am using the MouseUp event and I have the Arg1 and Arg2 data. What I don't have is the actual "name" of the point. If you mouse over the point it will tell you the "name" of the series and the "name" of the point. How do I get this "name"? Arg2 simply tells me which point (1,2,3,4 etc.) in the series. I need the name. thanks Lizzard ...

Index & Matching Functions
I have created a workbook with three sheets. The first contains data pertaining to a project type and a specific ID number that I have assigned to it. For Example: 1 Areospace Ground Equipment Complexes 2 Hangers 3 Maintenance Facilities 4 Warehouse Etc..... I have another sheet that contains a database of all my firm's completed projects in which I detail several fields (i.e. project number, description, location, cost, client, and its Project Type ID#-taken from the list aforemention...

Month to Date information
I am using a table that has the Date as the Primary key. I have built a userform that shows the various related Revenues that occured on that date, but I would like to show Month-to-Date information on that as well, i.e., if the current date being viewed is 20 July 2007, I would like the month-to-date add up all of the revenues from 01 July through 20 July. If I'm viewing 31 Aug 2007, I would like the revenues to add up 01-31 August. I am very new to Access,(so new, in fact, I have the "Dummy Book"), so dumb it down if you can. Thanks so much! This will give you all b...

CMFCPropertyGridCtrl
Hi All, I have an MFC application with a TreeView and a CDockablePane Properties Window. When I select a tree item - I display its properties in the properties window. That works. But I don't know how to change the tree item properties when I change the values in the properties window. My problem is in getting the values from the properties grid. I tried to override EndEditItem method like this: BOOL CMyMFCPropertyGridCtrl::EndEditItem(BOOL bUpdateData) { CMFCPropertyGridProperty* currProperty = GetCurSel(); if(currProperty) { //I don't like this implementa...

Formula to copy related information from sheet 1 to sheet 2
Hello guys, I hope you'll can help me. i have the information below in sheet 1. i need the information to be filtered, copy and paste in sheet 2 according to the month. example. if october, i need all information for the month of october to be copy and past from column A, B, C sheet 1 to column A, B, C sheet 2 please help. A B C Serial Number Quantities (Kilos) Date 8.1122 539,470 22/10/2009 8.1122 403,697 22/10/2009 8.1122 643,710 05/11/2009 8.1122...

Example of use WM_PRINTCLIENT and getting bitmap from invisible wnd
Hi, I had take a look to other post about this argoument, but I can't bitBlit ( or something similar ) the content of a window into another when the first is partially or completly invisible. I've succesfully grab the WM_PRINTCLIENT message in this way: ........... //{{AFX_MSG(CTest_Dlg) virtual BOOL OnInitDialog(); afx_msg LRESULT OnPrintClient(WPARAM wParam,LPARAM lParam); DECLARE_EVENTSINK_MAP() //}}AFX_MSG ................. .......... LRESULT CTest_Dlg::OnPrintClient(WPARAM wParam,LPARAM lParam) { HDC const hDC =(HDC) wParam; CDC *const pDC = CDC::FromH...

Why doesn't what I enter in the function bar appear in the cell?
I have a workbook that contains several copies of a master template worksheet. On one of these sheets when I enter text, it appears correctly in the function bar, but appears as a string of &s in the cell. This has only just occurred, and as far as I know used to work OK, i.e. it used to appear as text in the cell. What could cause this and what do I need to do to put it right? You wrote that the text appears as apersands (&). Did you really mean octothorpes (#)? If yes, then try formatting that cell as General--or anything but Text. Chris Mitchell wrote: > > I...

Implement Help function
Hello, I have a MFC dlg-based application where I want to implement a help function. For example, in Windows XP, going to the 'Properties' of 'My Computer' will show you a window with a question button on the titlebar. Is it possible to have this in dlg-based application?? thx "Wes" <saruman@pandora.be> wrote in message news:uiWUxx5sEHA.4040@TK2MSFTNGP09.phx.gbl... > Hello, > > I have a MFC dlg-based application where I want to implement a help > function. > For example, in Windows XP, going to the 'Properties' of 'My Computer'...

When mail merge, I get this error, Pubmerge "out of memory"
I am trying to mail merge and I get the error Pubmerge "out of memory" I am using publisher 97 and Excel 2002 Save the data as a CSV (comma delimited), could be a solution. Are your MDAC components current? PUB97: How to Obtain Publisher 97 Knowledge Base HTML Help File http://support.microsoft.com/kb/185798/en-us -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "r5j4g" <r5j4g@discussions.microsoft.com> wrote in message news:BC339DE0-5122-4FBB-AD03-C6941B3E22A0@microsoft.com... >I am trying to mail me...

Exact function
I've created a simple spreadsheet. Column A is a list of 15,034 used Work Order reference numbers (many values are missing); Column C is a complete list (25,000 WO numbers). I want to get a separate list of unused numbers, but can't get the EXACT function to work. ( I believe it should place a TRUE value in column D when the numbers match.) I've used: =OR(EXACT(C1,$A$1:$A$15034)), which I replicated down column D. It gives me nothing but FALSE values, even though about half the numbers match. BTW, I do get a TRUE value if I use =EXACT(C21,A1), so it may be an array problem....

Why do I keep getting repeated copies of the same incoming email
I have just upgraded to Outlook '03 and I have received 4 or 5 new separate emails, but have received numerous copies of each one - 310 copies at last count. Does anyone know why this is happening? On Tue, 12 Jul 2005 04:41:03 -1000, tcav80 <tcav80@discussions.microsoft.com> wrote: > I have just upgraded to Outlook '03 and I have received 4 or 5 new > separate > emails, but have received numerous copies of each one - 310 copies at > last > count. Does anyone know why this is happening? Do you have rules set up that make copies? What anti-virus software ...

Just register get US100
http://www.wealthtoolbox.com/?ref=ismailpj@streamyx.com ...

Cannot get mail to open on every try
I am currenty using version 2009 (Build 14.0.8064.0206) If I do not open in certain order, 1) mail 2) web browser and close in the same order the next time I try to open mail nothing happens and I have to restart the computer. Can anyone help with suggestions??? You need to update to 14.0.8089.0726 There is a known bug in your version where WLM does not always completely shutdown. That prevents it from starting again because its still running. This problem is fixed in the latest version available here: http://download.live.com -- Mike - http://TechHelp.Santovec.us ...

CODE: get current dir of MDB file
I will be posting a few short snippets of code. Many of you coders already know these, but they should benefit other people as well. Here is code to find the current directory of the MDB file you currently have open. This is useful for saving output files (like report PDFS, text files, etc) to the same dir as your MDB file. It returns the current directory with a trailing backslash. Function CurrentDBDir() As String Dim strDBPath As String Dim strDBFile As String strDBPath = CurrentDb.Name strDBFile = Dir(strDBPath) CurrentDBDir = Left(strDBPath, Len(strDBPath) - Len(strDBFile)) End...

Getting 552 Requested mail action aborted: (from one user on Hotmail)
I have a home user that is using a Hotmail account to communicate with our company. She can email us perfectly fine when she composes a new message...however, when she attempts to reply to a message sent from us, she is getting back and undeliverable message as follows: name@domain.com SMTP error from remote mailer after end of data: host mail.domain.com [xx.x.xxx.xx]: 552 Requested mail action aborted: exceeded storage allocation She gets this message even with no attachements. The host domain name and IP address are both correct as well as the email address (obviously since...

How how do I get a ligature tie bar below two characters? Help
The unicode character is 035C. I am using Word 2007 with Windows XP. When I type the character between the two letters, select it, and key in ALT x, I get the box that indicates a missing symbol. I can't find the symbol in the Arial Unicode MS set under IPA extensions, yet it is an IPA symbol and it does have a unicode character. Is there any way to make this work? (If this appears twice, forgive me. I am new to this discussion and am having some difficulty posting.) On Nov 15, 5:10=A0pm, Pamela Case <PamelaC...@discussions.microsoft.com> wrote: > The unicode chara...

Exchange 2003
Does Exchange 2003 finally address a major shortcoming of 2000 in that mail inbound that isn't resolved (bad address or whatever the case may be) cannot be forwarded to a specific mailbox? I am currently using 2000 and the hack/workaround with a VB COM component and second virtual server... I would like to upgrade to 2003 but I need to know if I this issue has been fixed. Thanks -- russ "Russ Bishop" <nowhere> wrote in message news:eQUSPPRtDHA.2136@TK2MSFTNGP10.phx.gbl... > Does Exchange 2003 finally address a major shortcoming of 2000 in that mail > inbound that...

Get Window Pixel
Hello: I have a pixel on the screen that I'm trying to obtain the color. The pixel is found in a static control, which is a class derived from CStatic. class CReflectColorWnd : public CStatic I've tried many ways to obtain the pixel, but I cannot attain the COLORREF of the pixel. I'm wondering if anyone would be kind enough to assist me. I've tried the following in the paint handler. void CReflectColorWnd::OnPaint() { CStatic::OnPaint(); // Call original paint CClientDC dc(this); CBitmap bm; bm.CreateCompatibleBitmap(&dc, 100, 100); CDC memDC; memDC...

table
with a vba macro I populated a table, the size of this table is variable in each execute this macro. and with this table I create pivot table, Database functions, but How to use all resources with all data? suggestions and examples thanks Marina Hi Marina Create a dynamic named range for your data. Insert>Name>Define>Mydata Refers to =OFFSET($A$1,0,0,COUNTA(A:A),10) The above example would create a range which contained as many rows as are present in column A, and the would be 10 columns wide. Change the formula as appropriate to your data location. Then in the Pivot Tab...

Subtract MM/DD/YYYY and get # months
I have a vacation earning chart where employees earn xx hours per pay period. When they have worked over xx months, they earn yy hours per pay period. I need a way to subtract their start date from the currend end-of-pay-period date to see where they fall in the leave earning chart - the catch is the answer has to be in months. I'm using Excel 2003. Any ideas? TIA, Carole O =DATEDIF(start_date,end_date,"m") will give you the number of months between start_date and end_date -- Regards, Dave <!-- "Carole O" wrote: > I have a vacation earning chart ...

Trim Function
Hi everybody I am trying to use a macro to trim a selected range but I can't seem to get it to function - the code looks like this Range("A2:R600").Select Dim MyString, TrimString MyString = " <-Trim-> " TrimString = Trim(MyString) TrimString = "<-Trim->" End sub I would be grateful for any suggetsions on how I can get this to work Thanks in anticipation Bill Hi Bill, Try this, Dim rngTemp As Range For Each rngTemp In Range("A2:R600") rngTemp.Value = Trim(rngTemp.Value) Next Cheers A...

Opening XLS file directly and getting params
All, I am working on a .NET application sued to "index" our many (+300) Excel 2000 reports. The users log in and get a list of reports that they are allowed to run. When they click on the "link", the app starts the appropriate spreadsheet. We are current doing this by running: Excel.exe "FILENAME" /e/PARAMETERS As you can see above, we are sending params (in this case, a connect string) into the spreadsheet (not my design, I inherited it...) and using some API calls that were found here to read the command line. This is working correctly, However, one of our...

The hide PivotTable items functionality is gone in my excel 2000
Hi, The hide PivotTable items functionality is gone in my excel 2000, meaning I do not see any drop down box to push... Any thoughts? Brgds Endre Your file is corrupted or MS will be sending you an ad for 2007? God Bless Frank Pytel "Endre" wrote: > Hi, > > The hide PivotTable items functionality is gone in my excel 2000, meaning I > do not see any drop down box to push... Any thoughts? > > Brgds > Endre No worries... When excel had a day to cool down, it decided to show me the drop down box'es the day after. Thanks anyway! Endre "Frank ...

Design Problem-Where to get started?
Access neophyte. Have access database with following characteristeics 1. Main record (publication) 2. subrecord (source)-multiple for each main record. required result: a. multilevell Pasword protection 1. Superuser/administrotor (full proivledges) 2. general user (querry/display only) b. querry by publication, display of subrecord only the querry/display interface is very specific. Querry input is to be main record only, display is to be subrecord only. any suggesgtions would be greatly apprreciated To provide different levels of security for the administrator and general users you...

Import from Excel User specified Contact Information
Hello there How can I import contact information from MS Excel when I have may contact fields that are not standard in Outlook (and so do not appear in the import dialog)? Best regards, UT ut wrote: > Hello there > How can I import contact information from MS Excel when I have may > contact fields that are not standard in Outlook (and so do not appear > in the import dialog)? > Best regards, UT You will have to modify the spreadsheet so that the fields match that of Outlook. I'm afraid that won't work. Outlook doesn't support importing to a = custom fields. ...