Hi,
I have produced some shape and want to keep it frozen in botom right corner while scrolling.
Is it feasable?
Regards,
Marcin4111
Hi,
I have produced some shape and want to keep it frozen in botom right corner while scrolling.
Is it feasable?
Regards,
Marcin4111
is it at least possible to proceed with above mentioned subject?
Hi Marcin4111,
Your request is possible, but requires a lot of work that is beyond my skill level.
See the attached file with the code that follows below, that uses a UserForm to simulate a Shape. The Caption on top of the UserForm has been hidden to make the UserForm look like a Rectangular Shape. The attached file uses an imported .jpg image ('Image1') and a UserForm Label ('Label1'). Either one of these can be used to simulate a Rectangular Shape, and can run a Macro if desired, when the UserForm is 'Left Clicked'.
The code has been tested using Excel 2003 and 32 bit Excel 2010. The code may run with 64 bit Excel, but has NOT been tested using 64 bit Excel. The code will NOT RUN on a MAC, because API (Application Programmer Interface) routines are used.
UserForm1 Code module:
NOTE: All of the UserForm code below is OPTIONAL.
In an Ordinary Code Module such as Module1 or ModUserForm1:Please Login or Register to view this content.
For help with Macros and VBA the following information may be useful:Please Login or Register to view this content.
To enable Macros and to Run Macros see the following:
http://office.microsoft.com/en-us/ex...010031071.aspx
http://office.microsoft.com/en-us/ex...010014113.aspx
If help is still needed do a google search for 'youtube excel enable macro' and/or 'youtube excel run macro'.
To access Visual Basic (VBA) see:
http://www.ablebits.com/office-addin...a-macro-excel/
a. Click on any cell in the Excel Spreadsheet (may not be needed).
b. ALT-F11 to get to VBA.
c. CTRL-R to get project explorer (if it isn't already showing).
d. Double Click on a 'Module Name' in 'Project Explorer' to see code for that module.
To import or export VBA Module Code:
a. To export, right click on the Module Name in the 'Project Explorer'.
b. Select export file. I suggest you use a SubFolder that only contains exported (.bas) files.
Keep the original name.
c. To import, right click anywhere in 'Project Explorer'.
d. Select import file. Select a file to import.
It is a best practice to declare all variables. If you misspell a variable in your code, VBA will silently assume it is a Variant variable and go on executing with no clue to you that you have a bug. Go to the VBA development window, click Tools, Options, and check "Require Variable Declaration." This will insert the following line at the top of all new modules:
This option requires all variables to be declared and will give a compiler error for undeclared variables.Please Login or Register to view this content.
Lewis
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks