PC Review


Reply
Thread Tools Rate Thread

Code no longer runs

 
 
MikeR
Guest
Posts: n/a
 
      30th Apr 2009
I made a sheet with a column containing a dropdown (which I now can't
find to change, but it still drops and allows selection) which has a
list of destinations. When a destination is chosen, code populates the
next column with the mileage from my house to the target.

When I cleared out last years mileages, I somehow disconnected the
code, and it no longer fires.

When I try to run it from the VBA editor, it wants a macro name.

Any suggestions for hooking it back up? I've probably described this
poorly. Can you tell I'm a newbie?

TIA, Mike
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      30th Apr 2009

Hard to tell without seeing. If desired, send the file to my address below
along with a snippet of this msg and clear instructions of what you need.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"MikeR" <(E-Mail Removed)> wrote in message
news:%23t$(E-Mail Removed)...
>I made a sheet with a column containing a dropdown (which I now can't find
>to change, but it still drops and allows selection) which has a list of
>destinations. When a destination is chosen, code populates the next column
>with the mileage from my house to the target.
>
> When I cleared out last years mileages, I somehow disconnected the code,
> and it no longer fires.
>
> When I try to run it from the VBA editor, it wants a macro name.
>
> Any suggestions for hooking it back up? I've probably described this
> poorly. Can you tell I'm a newbie?
>
> TIA, Mike


 
Reply With Quote
 
MikeR
Guest
Posts: n/a
 
      1st May 2009
Don Guillett wrote:
>
> Hard to tell without seeing. If desired, send the file to my address
> below along with a snippet of this msg and clear instructions of what
> you need.
>


Don said:

Your code could NEVER have worked since your worksheet event was not
in the sheet module and you were using a selection event instead of a
change event and there was no user form and your select was improperly
done........
Several ways to do this. One use a proper change event with a proper
select case or a VLookup in the macro or just a simple VLookup. In any
case I would put the list and numbers on another sheet so that the
list is not compromised when you delete rows.

BTW, I do custom excel programming @$75 hourly.
======================================================================
Don -
Thanks for taking a look. I can tell you with 100% certainty that at
one time, when an item was selected from the drop down, the adjacent
column was populated with the mileage. Why it doesn't now was the
whole purpose of my post.

Sorry, I'm too green to have the vocabulary to understand your
suggestions.

I'm not at all interested in paying you $75 an hour for programming.
This is just a little learning exercise for me.
 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      1st May 2009
All three of the examples I provided on your workbook worked to do as you
desire. I mentioned this in the private message (with the corrected file)
which you replied to here. Good luck.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"MikeR" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Don Guillett wrote:
>>
>> Hard to tell without seeing. If desired, send the file to my address
>> below along with a snippet of this msg and clear instructions of what you
>> need.
>>

>
> Don said:
>
> Your code could NEVER have worked since your worksheet event was not in
> the sheet module and you were using a selection event instead of a change
> event and there was no user form and your select was improperly
> done........
> Several ways to do this. One use a proper change event with a proper
> select case or a VLookup in the macro or just a simple VLookup. In any
> case I would put the list and numbers on another sheet so that the list is
> not compromised when you delete rows.
>
> BTW, I do custom excel programming @$75 hourly.
> ======================================================================
> Don -
> Thanks for taking a look. I can tell you with 100% certainty that at one
> time, when an item was selected from the drop down, the adjacent column
> was populated with the mileage. Why it doesn't now was the whole purpose
> of my post.
>
> Sorry, I'm too green to have the vocabulary to understand your
> suggestions.
>
> I'm not at all interested in paying you $75 an hour for programming. This
> is just a little learning exercise for me.


 
Reply With Quote
 
MikeR
Guest
Posts: n/a
 
      1st May 2009
Don Guillett wrote:
> All three of the examples I provided on your workbook worked to do as
> you desire. I mentioned this in the private message (with the corrected
> file) which you replied to here. Good luck.
>

Don -
My apologies and my thanks.

I didn't get that you had done up the 3 sheets, and so I didn't open
the workbook.

I don't understand how any of the 3 work, but I can dig into the books
again in a few weeks.

How did you un-hide the col with the names in it? I couldn't get to it.
 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      1st May 2009

I wondered why I sent it?
Try going to the help index and typing in
unhide column
When all else fails, RTFM
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"MikeR" <(E-Mail Removed)> wrote in message
news:ef%(E-Mail Removed)...
> Don Guillett wrote:
>> All three of the examples I provided on your workbook worked to do as you
>> desire. I mentioned this in the private message (with the corrected file)
>> which you replied to here. Good luck.
>>

> Don -
> My apologies and my thanks.
>
> I didn't get that you had done up the 3 sheets, and so I didn't open the
> workbook.
>
> I don't understand how any of the 3 work, but I can dig into the books
> again in a few weeks.
>
> How did you un-hide the col with the names in it? I couldn't get to it.


 
Reply With Quote
 
MikeR
Guest
Posts: n/a
 
      2nd May 2009
Don Guillett wrote:
>
> I wondered why I sent it?


Huh?

> Try going to the help index and typing in
> unhide column
> When all else fails, RTFM


I did RTFM. It didn't work.
 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      2nd May 2009

Display or hide rows or columns
Display a hidden row or column
1.. Select a row or column on each side of the hidden rows or columns you
want to display.
2.. On the Format menu, point to Row or Column, and then click Unhide.
Tip

If the first row or column of a worksheet is hidden, click Go To on the Edit
menu. Type A1 in the Reference box, and click OK. Point to Row or Column on
the Format menu, and then click Unhide.

Also, the row or column may have had the height or width set to zero. Point
to the border of Select All until the cursor changes to or , and drag to
widen the row or column.

Hide a row or column
1.. Select the rows or columns you want to hide.
How?

To select Do this
Text in a cell If editing in a cell is turned on, select the cell,
double-click in it, and then select the text in the cell.
If editing in a cell is turned off, select the cell, and then select
the text in the formula bar.



A single cell Click the cell, or press the arrow keys to move to the
cell.
A range of cells Click the first cell of the range, and then drag to
the last cell.
A large range of cells Click the first cell in the range, and then
hold down SHIFT and click the last cell in the range. You can scroll to make
the last cell visible.
All cells on a worksheet Click the Select All button.


Nonadjacent cells or cell ranges Select the first cell or range of
cells, and then hold down CTRL and select the other cells or ranges.
An entire row or column Click the row or column heading.


Adjacent rows or columns Drag across the row or column headings. Or
select the first row or column; then hold down SHIFT and select the last row
or column.
Nonadjacent rows or columns Select the first row or column, and then
hold down CTRL and select the other rows or columns.
More or fewer cells than the active selection Hold down SHIFT and
click the last cell you want to include in the new selection. The
rectangular range between the active cell and the cell you click becomes the
new selection.
Cancel a selection of cells Click any cell on the worksheet.


2.. On the Format menu, point to Row or Column, and then click Hide.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"MikeR" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Don Guillett wrote:
>>
>> I wondered why I sent it?

>
> Huh?
>
>> Try going to the help index and typing in
>> unhide column
>> When all else fails, RTFM

>
> I did RTFM. It didn't work.


 
Reply With Quote
 
MikeR
Guest
Posts: n/a
 
      4th May 2009
Thank you Don -
It was the "1.. Select a row or column on each side of the hidden rows
or columns you want to display." I missed.

Don Guillett wrote:
>
> Display or hide rows or columns
> Display a hidden row or column
> 1.. Select a row or column on each side of the hidden rows or columns
> you want to display.
> 2.. On the Format menu, point to Row or Column, and then click Unhide.
> Tip
>
> If the first row or column of a worksheet is hidden, click Go To on the
> Edit menu. Type A1 in the Reference box, and click OK. Point to Row or
> Column on the Format menu, and then click Unhide.
>
> Also, the row or column may have had the height or width set to zero.
> Point to the border of Select All until the cursor changes to or , and
> drag to widen the row or column.
>
> Hide a row or column
> 1.. Select the rows or columns you want to hide.
> How?
>
> To select Do this
> Text in a cell If editing in a cell is turned on, select the
> cell, double-click in it, and then select the text in the cell.
> If editing in a cell is turned off, select the cell, and then
> select the text in the formula bar.
>
>
>
> A single cell Click the cell, or press the arrow keys to move to
> the cell.
> A range of cells Click the first cell of the range, and then drag
> to the last cell.
> A large range of cells Click the first cell in the range, and
> then hold down SHIFT and click the last cell in the range. You can
> scroll to make the last cell visible.
> All cells on a worksheet Click the Select All button.
>
>
> Nonadjacent cells or cell ranges Select the first cell or range
> of cells, and then hold down CTRL and select the other cells or ranges.
> An entire row or column Click the row or column heading.
>
>
> Adjacent rows or columns Drag across the row or column headings.
> Or select the first row or column; then hold down SHIFT and select the
> last row or column.
> Nonadjacent rows or columns Select the first row or column, and
> then hold down CTRL and select the other rows or columns.
> More or fewer cells than the active selection Hold down SHIFT and
> click the last cell you want to include in the new selection. The
> rectangular range between the active cell and the cell you click becomes
> the new selection.
> Cancel a selection of cells Click any cell on the worksheet.
>
>
> 2.. On the Format menu, point to Row or Column, and then click Hide.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro no longer runs Lorne Microsoft Excel Programming 2 23rd May 2005 01:33 PM
Code in Access 2000 no longer runs =?Utf-8?B?QmlsbFM=?= Microsoft Access VBA Modules 0 21st Mar 2005 10:11 PM
Program no longer runs Laser Windows XP New Users 2 22nd Nov 2003 06:59 PM
Sysedit no longer runs Laser Windows XP General 6 22nd Nov 2003 04:43 AM
XP pro no longer runs Paul R Windows XP General 1 23rd Jul 2003 10:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:15 AM.