SaveasCopy代码 - 某些单元格的名称

时间:2018-05-13 18:27:35

标签: excel vba

下面我有一个用于保存文件的代码...但是,我需要使用来自单元格A10,B3和B4的值来命名文件。我试着在那里添加:

InitialName = Range(" A1")& " " &安培;范围(" B1")& " " &安培;范围(" C1&#34)

不幸的是它从来没有对我有用。

Sub filesave()

Dim bFileSaveAs As Boolean
bFileSaveAs = Application.Dialogs(xlDialogSaveAs).Show
If Not bFileSaveAs Then MsgBox "User cancelled", vbCritical

End Sub

编辑:我需要一个建议的名字在"另存为"基于A10和A10的值的对话框B3& B4。 enter image description here

1 个答案:

答案 0 :(得分:0)

通过你的解释,我现在更好地理解你尝试做什么。所以这里的代码将完全符合您的目标:

get_header(); ?>

<div id="main-content" class="main-content">

<?php
	if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
		// Include the featured content template.
		get_template_part( 'featured-content' );
	}
?>
	<div id="primary" class="content-area">
		<div id="content" class="site-content" role="main">
			     <section id="main_navigation" class="list">
 
</section>

             <div class="container"> 

<table id="tbl" border="10">
<thead>
<tr>
<td style="padding-left:3px">Name</td>
<td style="padding-left:3px">Created By</td>
<td style="padding-left:3px">Credit Cost </td>
<td style="padding-left:3px">Invited <br>Candidates</td>
<td style="padding-left:3px">Completed <br>Candidates</td>
<td style="padding-left:3px">Added Date</td>
<td colspan="3">Management</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
<br>
<a href="/create-project"><input type="button" value="Create a new project"/></a>


  </div>
		</div><!-- #content -->
	</div><!-- #primary -->
</div><!-- #main-content -->