VBA problem

  Chas49 15:06 09 Apr 2009
Locked

Ihave a workbook which contains many sheets.

The sheets are named Jan, Feb etc., I want to put a button on each form as the month becomes current, that part is easy of course.

I am designing an Input Form which will be loaded when the button is clicked - the problem is........How do I make the form deliver it's data to the active sheet holding the button clicked.

Is there a way of getting the active sheet name into a variable - or will the input form put the data into the active sheet anyway?

  VoG II 15:23 09 Apr 2009

If your code is along the lines of

Range("A1").Value = Me.TextBox1.Value

then the value will be written to A1 of the active sheet (the one with the button) unless your code selects another sheet.

  Chas49 15:26 09 Apr 2009

Many thanks VoG™ for the confirmation. It's been quite some time since I wrote any VBA code, but, apart from the occasional item, you don't really forget do you.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Xiaomi Mi Mix 2 review

Halloween Photoshop & Illustrator tutorials: 20 step-by-step guides to creating spook-tacular…

iPhone X news: Release date, price, new features & specs

Comment créer, modifier et réinitialiser un compte Apple ?