PDA

View Full Version : [SOLVED:] Need userform to interactively fill sunburst chart in powerpoint



chapel
02-05-2022, 11:29 AM
I want to work with a sunburst chart, and need help creating a userform that can edit data in the excel worksheet, that creates the sunburst chart.
I hope this description is adequate.

chears
chapel

chapel
02-18-2022, 01:22 AM
I'm sorry. I realize the information in my question is inadequate to give a serious answer

So here's what I have and what I want, and whats working and not working

What I have:
I have 3 columns: Month, Period, Task
And I have a userform with two listboxes and a textbox. There is also a controlbutton for edit/add and one for exiting the userform.


What I want:

Break down:
1: the user selects a month (column A) in listbox1
2: and from that choice, select one out of four assigned periods (column B) in listbox2. Each period has a specific task assigned.
3: This gives the user a preassigned task (from columnC) in textbox1
4: the user should be able to change the task (in textbox1) and save the result back into the original cell in column C.
5: After all changes are made, I want to create a sunburst chart in powerpoint, so I get an overview of standard tasks in a year.

Whats working and not

So far I got 1, 2 and 3 working.
but I cannot get edit to work in textbox1. (I can write something, but it doesn't reflect back into original cell in column C)
And since the above change doesnt work, the sunburst chart doesnt either. (havent come that far yet.)

hope this is helpful.

cheers
Chapel

chapel
02-19-2022, 04:22 PM
Update on progress:
I got 1 through 4 working. Userform created in excel and performs exactly as wanted.

Unfortunately I cannot get the link function to work properly. It worked the first time I set it up, but after that I'm unable to update the link.

Its a little tiresome to have to copy/paste from excel to powerpoint everytime there's been a change. And its not very userfriendly, which was the whole point.

So, if anyone has any ideas on how to solve that part, I would really appreciate some help.

cheers
Chapel

Bob Phillips
02-20-2022, 10:54 AM
Try this


Option Explicit
Public listPeriod As Range
Public listTask As Range

Private Sub ListBox1_Click()
Me.ListBox2.Clear
Select Case Me.ListBox1
Case "January": Set listPeriod = Sheets("Ark1").Range("B2:B5")
Case "February": Set listPeriod = Sheets("Ark1").Range("B6:B9")
Case "March": Set listPeriod = Sheets("Ark1").Range("B10:B13")
Case "April": Set listPeriod = Sheets("Ark1").Range("B14:B17")
Case "May": Set listPeriod = Sheets("Ark1").Range("B18:B21")
Case "June": Set listPeriod = Sheets("Ark1").Range("B22:B25")
Case "July": Set listPeriod = Sheets("Ark1").Range("B26:B29")
Case "August": Set listPeriod = Sheets("Ark1").Range("B30:B33")
Case "September": Set listPeriod = Sheets("Ark1").Range("B34:B37")
Case "October": Set listPeriod = Sheets("Ark1").Range("B38:B41")
Case "November": Set listPeriod = Sheets("Ark1").Range("B42:B45")
Case "December": Set listPeriod = Sheets("Ark1").Range("B46:B49")
End Select
Me.ListBox2.List = listPeriod.Value
End Sub

Private Sub ListBox2_Click()
With Me
.TextBox1.Text = Application.Index(listPeriod.Offset(0, 1), .ListBox2.ListIndex + 1)
End With
End Sub

Private Sub CommandButton1_Click()
With Me
listPeriod.Cells(.ListBox2.ListIndex + 1, 1).Offset(0, 1).Value = TextBox1.Text
End With

Private Sub CommandButton3_Click()
Unload Me
End Sub

chapel
02-21-2022, 05:07 PM
THANK YOU SOOO MUCH! Works perfectly. (obviously).
Now I just need to figure out a way to copy range("A2:E49") and paste it into a prn file, that feeds my sunburst diagram.
(I gave up the idea of linking the file to powerpoint, as it doesnt give me the result I need.

cheers
Chapel