I also couldn't found a 'quick' answer so I began working around that. In short, capture the need for a clearing of the form in a bolean global variable and when its true restart the form after closure.
i.e.
userform1 is opened by commandbutton1
module Globals holds the public declared...
Ok, Workbook_BeforeClose indeed redirects the systemclosebutton and 'outside' closure.
That's usefull indeed :)
Worksheet_Activate does nothing usefull. I think 'cause the worksheet is not manipulated on minimization en restoring of the workbook.
But in any case I can tackle this problem with...
I was just wondering reading your post why you don't fill the second listbox with the filtered data as soon as a choice is made in the first listbox?
By far I'm no expert but this is how I would do it i.e.:
Private Sub Listbox1_Change
'GET FIRST LETTER
character = left(listbox1.value,1)...
Is thát what it's called?
lol
But no, just trying to accomplish something with a high knowledge of excel and low knowledge of vba and learning along the way. (although a bit more of success and less of learning would be appreciated at this point. :-s )
Yet...
if I'm reading a bible...
Greetings,
Using:
excel 2003 - vba
with a little bit of knowledge
Creation:
I have created an "standalone" version of several interactive workbooks.
With standalone I mean that, in workbook_open, all sheetfunctions (scrollbars, tabs, etc.) and commandbars are disabled, my commandbar is docked...
excel displays a date but in reality uses a whole number as identifier for that date. excel counts the number of days as from januray 1, 1900 to the date entered and that is the identifier which makes it possible to count days.
(you can see the number when you enter a date in a cell formatted as...
hi Glenn
am I missing something?
quote:
"I just want this event to be fired when the when the user click save button.... "
therefor in answer to your question: the save button nina was talking about and which I presumed was on the sheet or form she uses which made me wonder why she don't uses...
I'm only a beginner but I did it like this
On a worksheet you have your accountnrs in a column
On your form you put a combobox
fill this combobox in the userform.activate event with these accountnos.
put on the userform all the textbox fields you need to display the data you want.
then in the...
By far I'm no expert, but I just wondered why you trigger the event in beforesave event of Workbook instead of putting the code in the click event of the save button.
Then personally I find it more userfriendly to let vba check datafields on required input and give a message when there isn't...
thnx PHV but with range.autofilter you need to give criteria right away and although a tip worth while this time I needed to check if autofilter was present for enduser purposes not to filter.
Although I trie to be as clear as possible when I state a problem, I don't always succeed by lack of...
using excel 2003-vba
since the autofilter is turned on and off by the same command I need to check if autofilter is activated on a sheet or not to subsequently activate it when it's not.
is there a way to check this?
tried:
if selection.autofilter = false then selection.autofilter
but...
okay findings:
added to code:
Sub BarsOff()
Dim Cbar As CommandBar
Dim CbarName As String
For Each Cbar In CommandBars
CbarName = Cbar.Name
Application.CommandBars(CbarName).Enabled = False
Next
End Sub
Sub BarsOn()
Dim Cbar As CommandBar
Dim CbarName As String
For Each Cbar In...
uhm what I used:
CommandBars("Sales").Protection = msoBarNoChangeDock
found it somewhere on the internet and it worked :-)
enabled:
well last time I tried to detect and disable all visible workbars I manage to get a empty one back on enabling again as I mentioned before. That scared...
as you might guess by my returning,
it doesn't work :-(
I was sure it would, it seemed so simple of a solution.
But as it turns out I have the habit of rightclicking on the free space yet this event even occurs when rightclicking on buttons and menu's
what an irritating piece of software to...
I also encoutered that problem a while ago
To me it was solved when you place the date as a number onto the sheet
In the beforeupdate event:
use the function format on the textbox
(so there is a standarized textstring)
indate.value = formatdatetime(InDate.value,vbshortdate)
or
indate.value =...
you get the error indeed since you have here an array named unbound with (listboxitems) dimensions as far as I can tell
I'm not all sure but I think you tried here to use the function ubound (no 'n').
hoped this helped.
I'm only in the early stages of vba
but I would tackle it like so:
Dim iColumn as integer
Dim iRow as integer
'search heading
iColumn = 0
While worksheets("[name]").cells(1,1 + iColumn).Value <> [columnheading]
iColumn = iColumn + 1
Wend
'check length cellcontent and apply formatting
for...
using excel 2003-vba
I have a database with a lot of code behind it to automize all. To protect the database and the code behind it against userinterference I have gave excel a 'standalone' appearance by activating a fullscreen mode and disabling the active menubar and fullscreen-menubar...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.