Autoload UserForm TextBoxes

Greetings,

I am trying to load a UserForm from one of a dozen different sheets.
I am using the Worksheet_BeforeDoubleClick event targeting column A to
start the UserForm.  If the target cell has a date in it, I need to
load the rest of the row (6 cells) into six TextBoxes (TB! thru TB6).
All of the examples that I have are to load a named range into a
ComboBox and then load the TextBoxes from the ComboBox RowSource.  

I can't do that here - No ComboBoxes!  

This should be simpler, but I can't get it to work.

There is one little twist, the code to load is not in the UserForm
code section - it is in a standard module.

 Here is the code that I am using:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'In the general module

Option Explicit
Public vTargetR As Variant

Sub CollectEntryData() 
Dim i As Integer
Dim rTargetAddress As Range

    rTargetAddress = Range("A" & vTargetR)
    For i = 1 To 6
        CustomerEntryForm.Controls("TB" & i).Value = _
          rTargetAddress.Offset(0, i - 1).Value'<<<<Bad
    Next i

End Sub
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'In each of the sheet code sections

Private Sub Worksheet_BeforeDoubleClick(ByVal _
  Target As Range, Cancel As Boolean)

    If Not Target.Count = 1 Or _
      Not Target.Row > 2 Or _
      Not Target.Column = 1 Then
        Cancel = True
        Exit Sub
    Else
        vTargetR = Target.Row
        CustomerEntryForm.Show
        Cancel = True
    End If
     
End Sub
++++++++++++++++++++++++++++++++++++++++++++++++++++++
'In the UserForm code section:

Private Sub UserForm_Initialize()

    CollectEntryData

End Sub
++++++++++++++++++++++++++++++++++++++++++++++++++++++

The bad code is in the CollectEntryData sub at the spot before the
 "<<<<Bad".

the error message is:

    Runtime error '91'
    Object variable or With block variable not set

Anyone have any ideas or suggestion as to what could be wrong and/or
how to fix it?

Any help is appreciated, thanks.

-Minitman	

0
Minitman
2/9/2010 2:41:27 AM
excel.programming 6508 articles. 2 followers. Follow

4 Replies
951 Views

Similar Articles

[PageSpeed] 44

Change this:

   rTargetAddress = Range("A" & vTargetR)

To this:

   Set rTargetAddress = Range("A" & vTargetR)






"Minitman" <steve@minitmaidsofaustin.com> wrote in message 
news:4n91n5p1n9jbtbbhb739nlse0kpi29a7ns@4ax.com...
> Greetings,
>
> I am trying to load a UserForm from one of a dozen different sheets.
> I am using the Worksheet_BeforeDoubleClick event targeting column A to
> start the UserForm.  If the target cell has a date in it, I need to
> load the rest of the row (6 cells) into six TextBoxes (TB! thru TB6).
> All of the examples that I have are to load a named range into a
> ComboBox and then load the TextBoxes from the ComboBox RowSource.
>
> I can't do that here - No ComboBoxes!
>
> This should be simpler, but I can't get it to work.
>
> There is one little twist, the code to load is not in the UserForm
> code section - it is in a standard module.
>
> Here is the code that I am using:
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 'In the general module
>
> Option Explicit
> Public vTargetR As Variant
>
> Sub CollectEntryData()
> Dim i As Integer
> Dim rTargetAddress As Range
>
>    rTargetAddress = Range("A" & vTargetR)
>    For i = 1 To 6
>        CustomerEntryForm.Controls("TB" & i).Value = _
>          rTargetAddress.Offset(0, i - 1).Value'<<<<Bad
>    Next i
>
> End Sub
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 'In each of the sheet code sections
>
> Private Sub Worksheet_BeforeDoubleClick(ByVal _
>  Target As Range, Cancel As Boolean)
>
>    If Not Target.Count = 1 Or _
>      Not Target.Row > 2 Or _
>      Not Target.Column = 1 Then
>        Cancel = True
>        Exit Sub
>    Else
>        vTargetR = Target.Row
>        CustomerEntryForm.Show
>        Cancel = True
>    End If
>
> End Sub
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 'In the UserForm code section:
>
> Private Sub UserForm_Initialize()
>
>    CollectEntryData
>
> End Sub
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> The bad code is in the CollectEntryData sub at the spot before the
> "<<<<Bad".
>
> the error message is:
>
>    Runtime error '91'
>    Object variable or With block variable not set
>
> Anyone have any ideas or suggestion as to what could be wrong and/or
> how to fix it?
>
> Any help is appreciated, thanks.
>
> -Minitman
> 


0
JLGWhiz
2/9/2010 3:30:09 AM
Thanks JLGWhiz - That fixed the problem.

I don't understand the rules for when to use or not use "Set".  And
not even sure where the rules are listed!

Thanks for the help.

-Minitman


On Mon, 8 Feb 2010 22:30:09 -0500, "JLGWhiz" <JLGWhiz@cfl.rr.com>
wrote:

>Change this:
>
>   rTargetAddress = Range("A" & vTargetR)
>
>To this:
>
>   Set rTargetAddress = Range("A" & vTargetR)
>
>
>
>
>
>
>"Minitman" <steve@minitmaidsofaustin.com> wrote in message 
>news:4n91n5p1n9jbtbbhb739nlse0kpi29a7ns@4ax.com...
>> Greetings,
>>
>> I am trying to load a UserForm from one of a dozen different sheets.
>> I am using the Worksheet_BeforeDoubleClick event targeting column A to
>> start the UserForm.  If the target cell has a date in it, I need to
>> load the rest of the row (6 cells) into six TextBoxes (TB! thru TB6).
>> All of the examples that I have are to load a named range into a
>> ComboBox and then load the TextBoxes from the ComboBox RowSource.
>>
>> I can't do that here - No ComboBoxes!
>>
>> This should be simpler, but I can't get it to work.
>>
>> There is one little twist, the code to load is not in the UserForm
>> code section - it is in a standard module.
>>
>> Here is the code that I am using:
>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> 'In the general module
>>
>> Option Explicit
>> Public vTargetR As Variant
>>
>> Sub CollectEntryData()
>> Dim i As Integer
>> Dim rTargetAddress As Range
>>
>>    rTargetAddress = Range("A" & vTargetR)
>>    For i = 1 To 6
>>        CustomerEntryForm.Controls("TB" & i).Value = _
>>          rTargetAddress.Offset(0, i - 1).Value'<<<<Bad
>>    Next i
>>
>> End Sub
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> 'In each of the sheet code sections
>>
>> Private Sub Worksheet_BeforeDoubleClick(ByVal _
>>  Target As Range, Cancel As Boolean)
>>
>>    If Not Target.Count = 1 Or _
>>      Not Target.Row > 2 Or _
>>      Not Target.Column = 1 Then
>>        Cancel = True
>>        Exit Sub
>>    Else
>>        vTargetR = Target.Row
>>        CustomerEntryForm.Show
>>        Cancel = True
>>    End If
>>
>> End Sub
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> 'In the UserForm code section:
>>
>> Private Sub UserForm_Initialize()
>>
>>    CollectEntryData
>>
>> End Sub
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>
>> The bad code is in the CollectEntryData sub at the spot before the
>> "<<<<Bad".
>>
>> the error message is:
>>
>>    Runtime error '91'
>>    Object variable or With block variable not set
>>
>> Anyone have any ideas or suggestion as to what could be wrong and/or
>> how to fix it?
>>
>> Any help is appreciated, thanks.
>>
>> -Minitman
>> 
>

0
Minitman
2/9/2010 3:48:54 AM
Since you declared rTargetAddress to be an object (a range), you need to use the
Set statement:

Set rTargetAddress = Range("A" & vTargetR)

Minitman wrote:
> 
> Greetings,
> 
> I am trying to load a UserForm from one of a dozen different sheets.
> I am using the Worksheet_BeforeDoubleClick event targeting column A to
> start the UserForm.  If the target cell has a date in it, I need to
> load the rest of the row (6 cells) into six TextBoxes (TB! thru TB6).
> All of the examples that I have are to load a named range into a
> ComboBox and then load the TextBoxes from the ComboBox RowSource.
> 
> I can't do that here - No ComboBoxes!
> 
> This should be simpler, but I can't get it to work.
> 
> There is one little twist, the code to load is not in the UserForm
> code section - it is in a standard module.
> 
>  Here is the code that I am using:
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 'In the general module
> 
> Option Explicit
> Public vTargetR As Variant
> 
> Sub CollectEntryData()
> Dim i As Integer
> Dim rTargetAddress As Range
> 
>     rTargetAddress = Range("A" & vTargetR)
>     For i = 1 To 6
>         CustomerEntryForm.Controls("TB" & i).Value = _
>           rTargetAddress.Offset(0, i - 1).Value'<<<<Bad
>     Next i
> 
> End Sub
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 'In each of the sheet code sections
> 
> Private Sub Worksheet_BeforeDoubleClick(ByVal _
>   Target As Range, Cancel As Boolean)
> 
>     If Not Target.Count = 1 Or _
>       Not Target.Row > 2 Or _
>       Not Target.Column = 1 Then
>         Cancel = True
>         Exit Sub
>     Else
>         vTargetR = Target.Row
>         CustomerEntryForm.Show
>         Cancel = True
>     End If
> 
> End Sub
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 'In the UserForm code section:
> 
> Private Sub UserForm_Initialize()
> 
>     CollectEntryData
> 
> End Sub
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
> The bad code is in the CollectEntryData sub at the spot before the
>  "<<<<Bad".
> 
> the error message is:
> 
>     Runtime error '91'
>     Object variable or With block variable not set
> 
> Anyone have any ideas or suggestion as to what could be wrong and/or
> how to fix it?
> 
> Any help is appreciated, thanks.
> 
> -Minitman

-- 

Dave Peterson
0
Dave
2/9/2010 4:05:55 AM
The rule is that if you want it to return an object, you use Set.  Set VBA 
help topic "Creating Object Variables" for more details.



"Minitman" <steve@minitmaidsofaustin.com> wrote in message 
news:1em1n5d901bl2dpt2gusigkjmgaoq6o84s@4ax.com...
> Thanks JLGWhiz - That fixed the problem.
>
> I don't understand the rules for when to use or not use "Set".  And
> not even sure where the rules are listed!
>
> Thanks for the help.
>
> -Minitman
>
>
> On Mon, 8 Feb 2010 22:30:09 -0500, "JLGWhiz" <JLGWhiz@cfl.rr.com>
> wrote:
>
>>Change this:
>>
>>   rTargetAddress = Range("A" & vTargetR)
>>
>>To this:
>>
>>   Set rTargetAddress = Range("A" & vTargetR)
>>
>>
>>
>>
>>
>>
>>"Minitman" <steve@minitmaidsofaustin.com> wrote in message
>>news:4n91n5p1n9jbtbbhb739nlse0kpi29a7ns@4ax.com...
>>> Greetings,
>>>
>>> I am trying to load a UserForm from one of a dozen different sheets.
>>> I am using the Worksheet_BeforeDoubleClick event targeting column A to
>>> start the UserForm.  If the target cell has a date in it, I need to
>>> load the rest of the row (6 cells) into six TextBoxes (TB! thru TB6).
>>> All of the examples that I have are to load a named range into a
>>> ComboBox and then load the TextBoxes from the ComboBox RowSource.
>>>
>>> I can't do that here - No ComboBoxes!
>>>
>>> This should be simpler, but I can't get it to work.
>>>
>>> There is one little twist, the code to load is not in the UserForm
>>> code section - it is in a standard module.
>>>
>>> Here is the code that I am using:
>>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> 'In the general module
>>>
>>> Option Explicit
>>> Public vTargetR As Variant
>>>
>>> Sub CollectEntryData()
>>> Dim i As Integer
>>> Dim rTargetAddress As Range
>>>
>>>    rTargetAddress = Range("A" & vTargetR)
>>>    For i = 1 To 6
>>>        CustomerEntryForm.Controls("TB" & i).Value = _
>>>          rTargetAddress.Offset(0, i - 1).Value'<<<<Bad
>>>    Next i
>>>
>>> End Sub
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> 'In each of the sheet code sections
>>>
>>> Private Sub Worksheet_BeforeDoubleClick(ByVal _
>>>  Target As Range, Cancel As Boolean)
>>>
>>>    If Not Target.Count = 1 Or _
>>>      Not Target.Row > 2 Or _
>>>      Not Target.Column = 1 Then
>>>        Cancel = True
>>>        Exit Sub
>>>    Else
>>>        vTargetR = Target.Row
>>>        CustomerEntryForm.Show
>>>        Cancel = True
>>>    End If
>>>
>>> End Sub
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> 'In the UserForm code section:
>>>
>>> Private Sub UserForm_Initialize()
>>>
>>>    CollectEntryData
>>>
>>> End Sub
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>
>>> The bad code is in the CollectEntryData sub at the spot before the
>>> "<<<<Bad".
>>>
>>> the error message is:
>>>
>>>    Runtime error '91'
>>>    Object variable or With block variable not set
>>>
>>> Anyone have any ideas or suggestion as to what could be wrong and/or
>>> how to fix it?
>>>
>>> Any help is appreciated, thanks.
>>>
>>> -Minitman
>>>
>>
> 


0
JLGWhiz
2/11/2010 3:14:50 PM
Reply:

Similar Artilces:

This has to be a WORD bug with TextBox VBA and protection
Try this please: 1. Create new doc as a dotm (macro enabled template) 2. From the Developer tab, Insert a ActiveX textbox control 3. Create a TextBox1.change routine, and apply some simple code – just MsgBox TextBox1 will suffice 4. Turn on Protect Document with editing restrictions Filling in Forms 5. Switch off Design Mode and test an entry in the text box Works fine. 6. Now close and save the dotm 7. Double-click the dotm from explorer (opens a document based on the template) 8. Take the Option (in toolbar) to allow active content 9. Try the textbox entry Can’t en...

Set the a differet value of a textbox based on input value
Hello to everybody. In a textbox I shoult type the value from 1 to 9 in the following way: 01, 02, 03, 04, 05, etc However may times I type only one digit: 1, 2, 4, 5, etc. Is there a way to get always as result 01, 02, 03. This way will help me a lot during the report sorted out by column Thanks for your help and regards John On Sun, 20 May 2007 07:25:07 +0200, John wrote: > Hello to everybody. > In a textbox I shoult type the value from 1 to 9 in the following way: 01, > 02, 03, 04, 05, etc > However may times I type only one digit: 1, 2, 4, 5, etc. > Is there a way to...

Userform button setting variable from formula #2
I have a userform that contains windows media player. I want to set CommandButton4 to take the value of the formula in cell A2 of the active sheet and set it as the value of variable named 'inset'. I'm finding the VBA code on this much harder to write than I thought it would be. Any ideas please, anyone? ...

Howto create textbox like in powerpoint
Hi Could someone tell me how to create powerpoint type textboxes? Are they windowless rich edit controls? Thanks Sachin They are rich edit control, but they have a window, they are owned by the window that they are being displayed on. AliR. "sachinkundu" <sachinkundu@gmail.com> wrote in message news:1170062520.486641.43880@m58g2000cwm.googlegroups.com... > Hi > > Could someone tell me how to create powerpoint type textboxes? Are > they windowless rich edit controls? > > Thanks > Sachin > > They are rich edit control, but they have a wind...

Excel and launching userforms
Greetings, I want to do something that I hope is not too unusual. i want to test a value in a cell, and if it one thing or another... launch a user form. Here is the scenario... test cell a1, if it is greater than 10, then launch userform1, userform1 will ask a question, if yes is selected it will write some text "and" the contents of cell a1 to cell b1. How do you do this? Thanks. -lumpjaw what is the trigger event. Do you want to launch the userform each time a cell is selected, each time there is a calculate, only when A1 is manually edited? When. See Chip Pearson...

Saving Input of Userform as a new line of data on another file?
Hi, Wonder if anyone can help me? I have create a form, and want to b able to save the info to another file(A) after I have click on button. Upon my next click, the new info from my form will be save as new entry (the next line) in file A. Thank you -- peppe ----------------------------------------------------------------------- pepper's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1635 View this thread: http://www.excelforum.com/showthread.php?threadid=27737 hi, it might be better to 1 button the whole thing. put the new record on the next line then copy...

Can't edit a Bound Textbox
This is a very basic question. Why can't I edit a textbox that's bound to a table? AllowEdit is set to Yes, and Enabled = Yes. What am I missing here? Is the field to which the textbox is bound an autonumber field? -- Ken Snell <MS ACCESS MVP> "mfm" <mfm@discussions.microsoft.com> wrote in message news:16167751-E140-410E-A99C-3A989D673517@microsoft.com... > This is a very basic question. Why can't I edit a textbox that's bound to > a > table? AllowEdit is set to Yes, and Enabled = Yes. What am I missing > here? Do yo...

Activate a moacro subroutine from a userform command button
[Excel 2003] I use macros in a worksheet - for example: Sub DateStamp() Range("b14") = Date & " " & Time 'Date And Time End Sub I access the macro with a command button in the spreadsheet. I would now like to access the same code using a command button on a Userform. I guess I could repeat the same code in the command button on the userform, but I would rather not duplicate the code. Is there a way to do this? Many thanks, Roger Hi, Private Sub CommandButton1_Click() Call DateStamp End Sub Mike "Roger on Excel"...

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 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...

Excel 2007
In my Excel-report I have a textbox to write comments. In Excel 2007 the "Enter"-knob on numeric part of keyboard doesn't work when typing in the textbox, but work as normal all other places in the workbook. Is this known by others, or is it just my server? Interesting! I can confirm this is the same behaviour that I have. best wishes -- Bernard Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme "Wegar" <Wegar@discussions.microsoft.com> wrote in message news:A054E635-9CB9-4B8A-AB0E-BC1CED2DA6AF@microsoft.com... > In my Excel-report I have a text...

How do I print a textbox in Excel?
...

User Form in VB = TextBox
Hi again I crated a User Form in VB and added a TextBox and i want the user to be able to enter 'Numbers only' not characters can anyone provide info please, if the user is trying to input other then numbers give no respond. thnx in advance Something like: Option Explicit Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) Select Case KeyAscii Case Asc("0") To Asc("9") 'do nothing Case Else Beep KeyAscii = 0 End Select End Sub Kel wrote: > > Hi again >...

text in textbox...
How do I change the text color in a textbox using VC++6. Thanks, RABMissouri In article <1105758768.117625.54770@f14g2000cwb.googlegroups.com>, rabmissouri@yahoo.com says... > How do I change the text color in a textbox using VC++6. Look up WM_CTLCOLOREDIT and WM_CTLCOLORSTATIC and it should tell you what you need to know. -- Later, Jerry. The universe is a figment of its own imagination. Then use a subclass of the control and use the "reflected" =WM_CTLCOLOR handler. Much cleaner than trying to do it in the parent. joe On Fri, 14 Jan 2005 20:58:52 -0...

insert all column(x) values in a single textbox
Hi to everyone, does anyone to know how can I insert in an unbounded texbox, separated from a ";" ALL the values coming from the column(x) of a combobox? On my form I have a combobox with its row source to a multicolumn query and it's bounded with an ID field. What I have to be able to do is that: to insert for each row, with same ID, of the combo the value with respect to its (x) column. Hi hope to have been clearly... Many thanks, Stefano. On 13 Feb, 08:08, ricc...@tin.it wrote: > Hi to everyone, > does anyone to know how can I insert in an unbounded texbox, separated &...

Configuration d'un TextBox
Bonjour, Quelqu'un peut-il me dire comment faire pour configurer (ou autre action) une zone de texte pour que celle-ci accepte les nombres avec un chiffre apr�s la virgule ? Les TextBox dont je me sers n'acceptent que les nombres entiers. D'avance merci, Jean-michel ...

Position Userform In Cells Portion of Excel Only
I have several userforms, some larger than peoples screens. When the user with a little screen clicks a button on Sheets("QUOTE") the userform opens and it is too large to fit on their screen, thus not giving them the ability to see all the controls on the userform. What I want to do is before each userform is opened run code that will test if the userform is larger than the displayed cells portion of Excel then add both scroll bars to the userform so the user can access all controls. I have this already, but it opens the userform at the very top of the application...

How do I add TextBox.values?
How do I add the Values of several Text Boxes And place it in Another Text Box. So the Sum of Text Boxes 1 to 13 is printed in text Box 14 Thanks for the Help. Wally As before, response in .programming. -- HTH RP (remove nothere from the email address if mailing direct) "WTG" <wtg_designs@hotmail.com> wrote in message news:9v8421dhqqn7dft2ipd8df4gufal04t12v@4ax.com... > How do I add the Values of several Text Boxes > > And place it in Another Text Box. > > So the Sum of Text Boxes 1 to 13 is printed in text Box 14 > > Thanks for the Help. > ...

UserForm + Dropdown
hi, I am able to make a drop down form $a$1:$a$4 it would show me something like this -----V apple apple grape peach what I would like to know if I am able to use the array list that excel uses on its autosort wich would be exacly the same but with no repetition. or would I need to make a function that has a sorting augotithm that feels my own array? and use the array on the drop down. I worry about the second option because my sheet has 45.000 lines and about different values 133 that might be slow John Walkenbach shares how to do this -- but with a listbox....

Blank Userform
Hi all, I have a slight problem, I have some code which adds rows with formfields in to a table in a protected form. These formfields have text in which is dependant upon users ticking checkboxes. Before adding the rows my code checks to see if particular rows have already been added to the table so that these rows are not added again. The whole macro takes about 30 seconds to run and to save users seeing Word 'dance' and the screen flash, I have tried to utilise a userform to appear for the duration of the code. Unfortunately the body of the userform turns bla...

Userform combobox question #2
Hi Can anyone tell me how, when I select an option in a drop down menu in a userform combobox, I can code it to shrink back down again once the selection is made. At the moment it just hangs there like a lemon until I click on it again do you think that more post will bet you more answere/ "teepee" wrote: > Hi > > Can anyone tell me how, when I select an option in a drop down menu in a > userform combobox, I can code it to shrink back down again once the > selection is made. > > At the moment it just hangs there like a lemon until I click on it agai...

changing size of textbox to match form
I have a single text box (a large one) in a form that pops up. I want the text box to change size as the user changes the size of the form. However, doing me.txtbox.width = me.width doesn't work, as the width value of the form doesn't seem to change, even as the form is resized by the user. How can get the textbox to always be the same size as the form that contains it? Phil Reynolds wrote: > I have a single text box (a large one) in a form that pops up. I want > the text box to change size as the user changes the size of the form. > However, doing me.txtbox.width = m...

Copy from Listbox or Textbox to folder on C Drive
Hi Is it possible to copy from a listbox to a folder on c:\ drive? Could you please give code snippet to help me. Thank you If no what if it is a textbox? is that possible? Ron On 02/07/2010 15:34, LondonLad wrote: > Hi > Is it possible to copy from a listbox to a folder on c:\ drive? > Could you please give code snippet to help me. > Thank you > > If no what if it is a textbox? is that possible? *sighs* How long have you been writing this and still lacking the basics? Check each of these keywords in the help. Open Print # Close That will allow y...

Copying and Userforms
Hello all, This one has me confused..completely. I currently have 10 worksheets in my workbook. I have a userform used to enter eight items into the first worksheet. I also have the same userform set to popup on opening each worksheet to do the exact same thing. The question is... Is there a way for me to type "Same" into the first field of the userform an have it read the cells it filled in from the first worksheet, then place that info into the current worksheet? I have studied heaps of copy paste examples, but none seem to demonstate a way for me to do this. Regards Peter ...

When Excel loads it autoloads a file
and I am not sure why. How do I tell it just to start normally without a file? thanks, bob You can create a shortcut that adds another parm. I rightclicked on an empty spot on the disktop and chose New|Shortcut. I browsed for my excel.exe and found it here: "C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE" Then I added a /e (space slash e) after that command: "C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE" /e If I use that shortcut, I don't get that startup workbook. BobH wrote: > > and I am not sure why. How do I tell it just to start norm...

how to close a userform with a commandbutton
I have a userform1 which contains a label, a textbox and a commandbutton. I would like to show the userform1 when the workbook opens and have the user enter the date in the textbox and have the date in the textbox returned to a cell in some worksheet (doesnt matter what name the ws is) when the user clicks the commandbutton. I also need to know how to close the userform1 when the user clicks the commandbutton. using xl2002 in winXP pro TIA Dave 1.. Open the workbook that you want this user input for. 2.. Press Alt-F11 to start the VBA editor. 3.. On the left part of the screen under ...