Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 'Range' set by userform

Hi


i currently have a macro that resizes the Y axis of a chart based on numbers
in two cells. at the moment these cells are static, so i can set up the macro
with an actual cell reference in the coding. soon I am going to have send
this out to others who may move the cells which feed this macro.

I was wondering if i could make a userform that would, having clicked to
start the macro, ask the user to input the two cell references where the
information for new axis size can be found.

i have used user forms before & obviously have a currently ok macro, i just
cant work out how i transform my existing macro so its populated with the
specific info from a userform.

any help gratefully received. let me know if you need more info.


cheers


jb
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default 'Range' set by userform

This could be done w/o a UserForm.

Set rng = Application.InputBox("Highlight two cells with Y-axis
info.", Type:=8)

Hth,
Merjet


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default 'Range' set by userform

You could offer default cells, too.

Set rng = Application.InputBox("Highlight two cells with Y-axis
info.", Default:="Sheet1!B4:B5", Type:=8)

Hth,
Merjet


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default 'Range' set by userform

Cheers merjet

worked a treat

jb

"merjet" wrote:

You could offer default cells, too.

Set rng = Application.InputBox("Highlight two cells with Y-axis
info.", Default:="Sheet1!B4:B5", Type:=8)

Hth,
Merjet



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UserForm fill by Range StephanieH Excel Programming 2 February 23rd 07 07:56 PM
Fill-in Range from UserForm JK Excel Programming 3 October 15th 05 04:32 PM
Range Values into userform Stuart[_21_] Excel Programming 5 March 24th 05 06:02 PM
UserForm to A Range Dan Gesshel Excel Programming 1 September 1st 03 07:08 AM
UserForm To A Range Dan Gesshel Excel Programming 2 August 29th 03 01:03 PM


All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"