?
Solved

Problem finding correct place for code

Posted on 2014-04-30
6
Medium Priority
?
169 Views
Last Modified: 2014-04-30
Folks,
I have tried to work through the code on the list box "Topics" where the user double- clicks on the Topic so it takes them directly to the desired worksheet. I've tried to execute the GoToSelect module in the double-click event so I could then delete the command button  GotToSelection rather than hide this command button.
Financial-Analysis-Revised.xlsm
0
Comment
Question by:Frank Freese
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 49

Expert Comment

by:Martin Liss
ID: 40032631
I don't understand what you are asking. When I double-click one of the topics it goes to the associated sheet. What do you want to do differently?
0
 
LVL 34

Assisted Solution

by:Norie
Norie earned 1000 total points
ID: 40032639
When I double click an item in the Topics listbox I'm taken to the relevant sheet.

Is that not what you want to happen?

Is there some other problem?

If you want to get rid of the hidden Goto Selection button move the code to the Double Click event of the listbox.
Private Sub lstTopic_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim strSheetName As String

    On Error GoTo ErrorRoutine

    strSheetName = Worksheets("SheetNames").Range("ShowSheet")(intListIndex)

    GotoSelection.Enabled = True
    ResetIndicators
    Application.Goto Sheets(strSheetName).Range("A1"), True
    Exit Sub
ErrorRoutine:
    MsgBox "The 'Go To Selection' sheet name for your selection needs to be added to sheet 'SheetNames'"

End Sub

Open in new window

PS I substituted all the activate/select with Application.Goto which will do the same thing.
0
 
LVL 34

Expert Comment

by:Norie
ID: 40032679
Actually that won't work because there's something else, well perhaps more than one thing, going on.

PS Why a Click and DblClick for the listbox? They actually appear to be clashing.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Frank Freese
ID: 40032935
Martin & Imnorie,
When I first started this project (from another workbook) the user could click on a Topic and it would go to another section on the  worksheet where the user could click on the command button "Go To Selection". Later it was suggested just double-click on the Topic list box . I've since eliminated everything below the two list boxes and text box and just having the user double-click on the Topic. I've bounced all around trying to make this work. So what I did was simply keep the command button Go To Selection but made it invisible. That's not very good design. I even created a module modGoToSelection and placed that in the double-click event for the Topic list box.  I get this error:
go to selectionI've included the file that this error appears.
Financial-Analysis-Revised.xlsm
0
 
LVL 49

Accepted Solution

by:
Martin Liss earned 1000 total points
ID: 40032945
Here's a wb that works. Most if not all of the credit should go to imnorie because he understood what you wanted and came up with (most of) the answer. My changes are marked with 'new.
Financial-Analysis-Revised.xlsm
0
 

Author Closing Comment

by:Frank Freese
ID: 40033182
Perfect - I'm surprised at how close I was just missed a few items.
That's why I called you all
Thanks again!
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question